Skip to content

Conversation

@weiji14
Copy link
Member

@weiji14 weiji14 commented Dec 5, 2025

Apply pydocstyle lint rule with the 'google' convention, then fix violations by adding more docstrings to public modules/classes/functions.

TODO:

  • Initial commit
  • D100: Missing docstring in public module
  • D101: Missing docstring in public class
  • D103: Missing docstring in public function
  • D417: Missing argument description in the docstring for {definition}: {name}

References:

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.
@weiji14 weiji14 added the documentation Improvements or additions to documentation label Dec 5, 2025
@weiji14 weiji14 marked this pull request as ready for review December 8, 2025 02:37
@weiji14 weiji14 requested a review from srmsoumya December 8, 2025 02:37
Comment on lines +25 to +28
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.
Copy link
Member Author

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"
Copy link
Member Author

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.

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants