-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Doc string of some function parameters in API doc missing #2472
Comments
As observed by @purva-thakre at the Mitiq Community call, it may be as simple as having a new line between the name of the parameter and the description of the parameter. |
On the issue of catching docstring formatting issues, we could enable https://docs.astral.sh/ruff/settings/#lintpydocstyle Line 6 in 483ec92
Edit: If I edit the toml file as shown below, the errors in the description are indeed caught by
|
@purva-thakre Sounds good. |
Does it feel like enforcing a standardized coding style via linter is something the project needs? It is a somewhat blunt solution to the problems in the referenced issues. If it is a desired path it sounds like there may be some consensus needed for what rules to implement. Can that type of decision be made quickly in this group? |
@walkingalchemy 👋 Note we are proposing specifically linting of the docstring, as oppposed to a general coding style, as a solution to the problems in the referenced issues. If you have a better solution in mind, feel free to suggest it.
We should start with the minimum set of new rules that fixes this issue along with #2422. |
Sounds good @cosenal 👋 I am willing to investigate if you'd like to assign this to me. I'm away from my desk for a few more days but I can pick it up next week. |
Coincidentally #2525 fixes the issue for the link reported in the original post of this issue, see same link but on latest build: https://mitiq.readthedocs.io/en/latest/apidoc.html#module-mitiq.observable.pauli |
Closing this as I couldn't reproduce it after #2525. Even after artificially adding a new line between the argument name and description doesn't break it 👌 |
In the API doc, the parameters of some of the functions are missing the docstring after the docs are build, despite it's there in the source code, e.g., https://mitiq.readthedocs.io/en/stable/apidoc.html#module-mitiq.observable.pauli
The text was updated successfully, but these errors were encountered: