-
Notifications
You must be signed in to change notification settings - Fork 0
Enable pydocstyle (D) ruff rule and add more docs #21
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
base: main
Are you sure you want to change the base?
Conversation
Add a ruff rule to catch missing documentation. Using google convention so that undocumented-param (D417) rule is enabled to catch missing params, xref https://docs.astral.sh/ruff/rules/undocumented-param. Extended to include D213 (instead of D212) and D410 rules too.
Also ignore rule D205 to allow first sentence of docstring to wrap to multiple lines.
| Args: | ||
| buffer_size_km: Radius of the buffer in kilometres. | ||
| state: Pass in 'place' as state into this agent. | ||
| tool_call_id: Optional ID for tracking the tool call. |
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.
All arguments to public functions will now need to be documented to adhere to pydocstyle rule D417.
| [tool.ruff.lint.pydocstyle] | ||
| # See https://docs.astral.sh/ruff/faq/#does-ruff-support-numpy-or-google-style-docstrings | ||
| # for the enabled/disabled rules for the "google" convention. | ||
| convention = "google" |
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.
Using 'google' convention because that's the prevailing docstring type currently, and also because the D417 undocumented-param rule will be enforced.
Apply pydocstyle lint rule with the 'google' convention, then fix violations by adding more docstrings to public modules/classes/functions.
TODO:
References: