<#10432 docs: Fix docstring `Args` entries for par...
# meltano-repo-activity
g
#10432 docs: Fix docstring `Args` entries for parameters that don't exist Pull request opened by mmporong Description Some docstring
Args
sections name parameters that the function does not have: an older name of a parameter, or a parameter that is not in the signature at all. This renames those entries to the current parameter name or removes them: • `meltano.cli.cli.detect_selected_environment`:
no_environment
->
cli_no_environment
, removed
project_setting_service
• `meltano.cli.utils.check_dependencies_met`:
plugins
->
plugin_refs
,
plugin_service
->
plugins_service
•
meltano.cli.job._list_single_job
and `_list_all_jobs`: removed
project
• `MigrationService.upgrade`: removed
lock_path
and
migration_directory
• `PackageManager.install`: removed
log_path
(it is a field of the
PackageManager
dataclass, documented just above the method) • `VirtualEnvService.__init__`: removed
python
• `meltano.core.logging.formatters.plain_formatter`: removed
features
• `LockfileAlreadyExistsError.__init__`: removed
plugin
• `ScheduleService.add_elt`: removed
session
(the method takes
**env
, so a
session=
argument would end up in the schedule's env) Now that all of their parameters are documented, the
# noqa: D417
on
detect_selected_environment
and
check_dependencies_met
is unused (ruff reports it as
RUF100
), so it is removed. The other
# noqa: D417
comments still cover parameters that are not documented (
ctx
in
_list_single_job
,
_list_all_jobs
and
_validate_tasks
,
required
in
activate_environment
), so they stay. Left as is: the
dialect
entries in
meltano.core.sqlalchemy
, where the parameter is named
_dialect
only to mark it unused, and
lock
in
ProjectAddService.add
, which
add_required
passes through
**attrs
. The entries were found with a script that compares the names in each docstring's
Args
section with the function signature; the two hits in functions that take
**kwargs
were checked by hand. Before: 18 entries in 15 functions under
src/meltano
(migrations excluded). After: the 4
_dialect
entries and the
lock
entry above. Checks run locally: • `prek run --files <changed files>`: all applicable hooks pass (ruff 0.16.6 check and format, typos, whitespace and end-of-file) • `ruff check src`: pass •
ruff check --select D417 --ignore-noqa
on the changed files:
detect_selected_environment
and
check_dependencies_met
are no longer reported, and the 4 remaining reports are the functions listed above •
ty check
(0.0.84) and
mypy
(2.4.0): pass • Tests for the touched modules, one
pytest
run per file, on Python 3.15.0rc1 and 3.12.3, each with `COLUMNS=200`: 200 passed and 1 xfailed on each (
tests/meltano/core/logging/test_formatters.py
,
tests/meltano/core/test_plugin_lock_service.py
,
tests/meltano/core/test_migration_service.py
,
tests/meltano/core/test_schedule_service.py
,
tests/meltano/core/test_venv_service.py
,
tests/meltano/cli/test_cli.py
,
tests/meltano/cli/test_job_cmd.py
,
tests/meltano/cli/test_add.py
). With the default terminal width in this environment,
test_console_log_formatter_max_frames
fails the same way on
main
. Checklist • I have read the contribution guide Was generative AI tooling used to co-author this PR? • Yes (please specify the tool below) Generated-by: Claude Code following the agentic coding guidelines Related Issues • None Summary by Sourcery Enhancements: • Correct docstring
Args
sections across CLI and core services to match current function signatures, removing entries for nonexistent parameters and updating outdated parameter names. meltano/meltano