Skip to content

Fix incorrect parameter names in docstrings#5412

Open
eeshsaxena wants to merge 3 commits into
MDAnalysis:developfrom
eeshsaxena:fix/docstring-param-names
Open

Fix incorrect parameter names in docstrings#5412
eeshsaxena wants to merge 3 commits into
MDAnalysis:developfrom
eeshsaxena:fix/docstring-param-names

Conversation

@eeshsaxena

@eeshsaxena eeshsaxena commented Jun 29, 2026

Copy link
Copy Markdown

Fix incorrect parameter names in docstrings

Changes made in this Pull Request:

Several docstrings document parameter names that do not match their function signatures:

  • MDAnalysis.lib.util.which documents programe (typo) instead of program.
  • MemoryReader.add_transformations (coordinates/memory.py) documents transform_list instead of the actual *transformations parameter.
  • MDAnalysis.guesser.base.GuesserBase.is_guessable documents guess instead of its attr_to_guess parameter (the sibling guess_attr already documents it correctly).

Documentation-only change; no behaviour is affected.

(Note: coordinates/base.py has the same add_transformations docstring issue, but it was left out of this PR because that file is not yet black-formatted and including it tripped the black CI on pre-existing, unrelated lines. Happy to do it in a separate PR if you would like.)

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes

Partial. An AI assistant was used to help identify the docstring/signature mismatches (via a script comparing documented parameters against function signatures) and to draft wording. Every change was manually reviewed and verified against the actual function signatures.

PR Checklist

  • Tests? (n/a, documentation-only)
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?
  • LLM/AI disclosure updated.

Several docstrings documented parameter names that don't match their
signatures:

- util.which documented 'programe' (typo) instead of 'program'.
- TransformationsBase.add_transformations (FrameIteratorBase and
  MemoryReader) documented 'transform_list' instead of 'transformations'.
- GuesserBase.is_guessable documented 'guess' instead of 'attr_to_guess'.
The same add_transformations docstring fix remains in coordinates/memory.py;
base.py is left untouched to avoid a large unrelated reformatting diff.
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.85%. Comparing base (32b7808) to head (63e1be4).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5412   +/-   ##
========================================
  Coverage    93.85%   93.85%           
========================================
  Files          182      182           
  Lines        22509    22509           
  Branches      3202     3202           
========================================
  Hits         21125    21125           
  Misses         922      922           
  Partials       462      462           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@IAlibay IAlibay 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.

Thanks for opening this PR @eeshsaxena - however, before we do any rerview, we ask you to fill in the AI declaration section that was in the original PR template.

@eeshsaxena

Copy link
Copy Markdown
Author

Thanks @IAlibay, apologies for missing that - I've filled in the LLM/AI disclosure section now. I also trimmed the PR to leave out coordinates/base.py (its pre-existing non-black-formatted lines were tripping the black check); the remaining three files are black-clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants