-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Enable missing argument in docstring lint #15721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
09f601c
b225abc
c6d2948
c035b03
3b8e1c5
e614f4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -254,7 +254,7 @@ def _samples_to_packed_array( | |
| def _final_measurement_mapping(circuit: QuantumCircuit) -> dict[tuple[ClassicalRegister, int], int]: | ||
| """Return the final measurement mapping for the circuit. | ||
|
|
||
| Parameters: | ||
| Args: | ||
| circuit: Input quantum circuit. | ||
|
Comment on lines
-257
to
258
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't mind standardising these, but Napoleon documents "Args" as an alias to "Parameters", so they should be all internally normalised into the same section heading anyway.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it was a bit annoying, but the rule checker only looks for |
||
|
|
||
| Returns: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a private function - does the Ruff rule enforce that all private functions have complete "Args" definitions, or just ones that specify an "Args" section? (I guess/hope the latter.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the latter, it only looks at docstrings with an
Argssection: https://docs.astral.sh/ruff/rules/undocumented-param/#pydocstyle-d