Skip to content

docs: address PEP 257 docstring conventions across the codebase#760

Merged
geritwagner merged 2 commits into
mainfrom
codex/fix-pep-257-docstring-convention-issues
May 13, 2026
Merged

docs: address PEP 257 docstring conventions across the codebase#760
geritwagner merged 2 commits into
mainfrom
codex/fix-pep-257-docstring-convention-issues

Conversation

@geritwagner
Copy link
Copy Markdown
Collaborator

Motivation

  • Reduce pydocstyle/Ruff violations classified under “Enforce PEP 257 Docstring Conventions” without changing runtime behavior.
  • Provide concise, consistent docstrings for missing magic methods and __init__ methods to improve code clarity and satisfy D105/D107 rules.
  • Normalize small formatting issues (blank lines between summary and description, terminal punctuation and short imperative summaries) to improve uniformity across packages.

Description

  • Added short, non-functional docstrings to many missing magic methods (e.g., __init__, __str__, __repr__, __eq__, __lt__, __iter__) and other constructors across the codebase to address D105/D107 violations.
  • Inserted required blank lines and adjusted multi-line summaries and final punctuation in numerous docstrings to address D203/D205/D213/D415 and related rules.
  • Normalized a number of small docstring wording/formatting items (argument descriptions, start-of-docstring capitalization and phrasing) to reduce D401/D417/D404/D419/D402/D403/D406/D407/D417 style issues while preserving public APIs and runtime behavior.
  • Changes are documentation-only and do not modify logic, signatures, imports, or behavior; updates were applied across many modules and packages (over 200 files touched).

Testing

  • Ran ruff check colrev --select D --statistics and ruff check colrev --select D --fix, which substantially reduced docstring violations from roughly 520 to ~193 D-rule issues and applied all available auto-fixes.
  • Attempted to run pytest -q, but the test run failed in this environment with an import path/module resolution error (ModuleNotFoundError: No module named 'colrev'), so the full test-suite could not be executed here.
  • No runtime tests failed as a result of these edits because the changes are documentation-only and do not alter executable behavior.

Codex Task

@geritwagner geritwagner merged commit 9dfbaef into main May 13, 2026
7 checks passed
@geritwagner geritwagner deleted the codex/fix-pep-257-docstring-convention-issues branch May 13, 2026 14:06
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

return ""

else:
print("\n" + "API key: " + api_key + "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants