Fix and improve project docstrings#170
Open
Copilot wants to merge 6 commits into
Open
Conversation
Copilot created this pull request from a session on behalf of
llucax
June 29, 2026 13:21
View session
Add missing pydoclint options to `[tool.flake8]` in `pyproject.toml`: - `check-class-attributes = true` - `check-style-mismatch = true` - `require-inline-class-var-docs = true` - `skip-checking-short-docstrings = true` Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Add `relative_crossrefs: true` to `mkdocs.yml` `mkdocstrings` options. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
- `Interval` class: fix typo "limites" → "limits", add cross-references for `.start` and `.end` attributes in the class body docstring - `Interval.__contains__`: move summary to the opening line, remove type hint from the `Returns:` section (DOC111 equivalent) Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
- Module docstring: correct the `Note:` admonition that incorrectly stated a `ValueError` would be raised for duplicate `str_prefix` registrations; the code only logs a warning - `BaseId.__eq__`, `__lt__`: add missing `Args:` and `Returns:` sections - `BaseId.__hash__`: add missing `Returns:` section Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
7e3df90 to
2f0043c
Compare
2f0043c to
06eab6a
Compare
- `DeprecatingEnumType.__new__`: add cross-reference for `DeprecatedMember` - `DeprecatingEnumType` class docstring: add cross-references for `DeprecatedMember` and `deprecated_member()` in the Behavior block Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Fix typo `metaclas` → `metaclass` in `NoInitConstructibleMeta` docstring example. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
06eab6a to
7f9e2f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sweep of docstring violations and missing tooling configuration per Frequenz Python docstring conventions.
Config (
mkdocs.yml,pyproject.toml)mkdocs.yml: addrelative_crossrefs: trueto mkdocstrings handler options (convention rollout)pyproject.toml[tool.flake8]: add four missing pydoclint keys:check-class-attributes = true— DOC601/603/605/607check-style-mismatch = true— DOC003 (convention rollout)require-inline-class-var-docs = true— inline attribute docs (convention rollout)skip-checking-short-docstrings = true— exempt trivial one-linersSource fixes
math.pyIntervalclass docstring: typolimites→limits; plain backtickstart/end→ relative cross-references[.start][.start]Interval.__contains__: summary moved onto opening"""line;bool:type annotation removed fromReturns:(type hints belong in signatures only)id.pyNote:incorrectly stated aValueErroris raised for duplicatestr_prefix— the code only logs a warningBaseId.__eq__,__lt__: add missingArgs:andReturns:sectionsBaseId.__hash__: add missingReturns:sectiontyping.pyNoInitConstructibleMetadocstring example: typometaclas=→metaclass=enum.pyDeprecatingEnumType.__new__and classBehavior:block: upgrade plain`DeprecatedMember`backtick references to cross-references