Skip to content

Fix docstring Args entries that name a parameter the function does not take - #22733

Merged
desertaxle merged 1 commit into
PrefectHQ:mainfrom
darkdi:fix/docstring-arg-names
Aug 6, 2026
Merged

desertaxle merged 1 commit into
PrefectHQ:mainfrom
darkdi:fix/docstring-arg-names

Conversation

@darkdi

@darkdi darkdi commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Twenty-two Args: entries name a parameter the function does not take. Docstrings only — no signature, no behaviour, no test touched.

Twelve are renames where the docstring kept the old name:

Where Documented Actual
WorkPoolClient.send_worker_heartbeat (sync and async) return_id get_worker_id
WorkQueueHealthPolicy.evaluate_health_status late_runs late_runs_count
use_profile override_environment_variable override_environment_variables
Flow.deploy and Flow.adeploy print_next_steps_message print_next_steps
ContainerInstancePushProvisioner._log_into_registry registry_name login_server
LocalStorage Path path
create_storage_from_source url source
include_object type type_
read_events filter events_filter
_construct_block_schema_fields_with_block_references block_schema_with_references block_schemas_with_references

send_worker_heartbeat also referred to return_id a second time inside its own description, so that went too.

The other ten document something that is not an argument:

  • PrefectEventSubscriber.__init__ documents api_key, which the constructor does not take — it reads the auth string from settings.
  • Flow.retry documents return_state; it takes only flow_run.
  • Task.serve and Task.aserve document task_runner; both take no arguments at all, so the whole Args: block went.
  • AsyncPostgresConfiguration.engine and AioSqliteConfiguration.engine each document connection_url, echo and timeout. All three are attributes — the entries even say "Defaults to self.connection_url" — and engine() takes only self.

Every entry was opened and read against its signature. ruff check and ruff format --check pass on all twelve files with the pinned ruff==0.15.19 from .pre-commit-config.yaml.

@codspeed

codspeed Bot commented Aug 6, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 8 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing darkdi:fix/docstring-arg-names (12e13f4) with main (baa13ab)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

@desertaxle desertaxle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@desertaxle
desertaxle merged commit eff3759 into PrefectHQ:main Aug 6, 2026
103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants