Skip to content

chore: replace darglint with pydoclint#151

Open
williaby wants to merge 3 commits into
mainfrom
chore/replace-darglint-with-pydoclint
Open

chore: replace darglint with pydoclint#151
williaby wants to merge 3 commits into
mainfrom
chore/replace-darglint-with-pydoclint

Conversation

@williaby
Copy link
Copy Markdown
Owner

Summary

  • Migrates docstring linting from archived darglint to pydoclint per updated standards manifest (TOOL-007/PC-006/TOOL-013).
  • darglint was absent from this repo, so this is a net addition rather than a swap.
  • Posture: keep raises, require docstring arg type hints, lenient on Returns/Yields sections.

Changes

  • pyproject.toml: adds pydoclint>=0.8.4 to dev deps; adds [tool.pydoclint] config block (google style).
  • .pre-commit-config.yaml: adds pydoclint hook pinned to rev 88d83c94156c5e51a09938e77019f2c58e92ab58 (0.8.4) with pragma allowlist secret.
  • src/ledgerbase/config.py, error_handlers.py, models.py, security.py, src/services/plaid_service.py, encryption.py: 59 pydoclint violations fixed (DOC001/101/103/105/109/110/201/203/301/601/603/605). Converted NumPy-style dashes to Google style, added missing Returns sections, added type hints to docstring arg entries, combined init docstring into class docstring.

Test plan

  • pydoclint --config=pyproject.toml . exits clean (verified locally).
  • pre-commit run pydoclint --all-files passes (verified locally).
  • CI passes on this branch.

Generated with Claude Code

williaby and others added 3 commits May 30, 2026 22:27
Migrates docstring linting from archived darglint to pydoclint per
updated standards manifest (TOOL-007/PC-006/TOOL-013). Adds pydoclint
>=0.8.4 to dev deps, [tool.pydoclint] config block (google style), and
pydoclint pre-commit hook. darglint was absent so this is a net addition.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Converts NumPy-style Args/Returns dash-underlines to Google style,
adds missing Returns sections (DOC201/203), adds type hints to
docstring arg entries (DOC105/109/110), and adds type annotations to
ExampleModel class attributes to satisfy DOC605. All 59 violations
resolved; pydoclint now exits clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Combines __init__ docstring into class docstring (DOC301), converts
NumPy-style sections to Google style, adds CONFIG_ERROR_MSG attribute
to class Attributes section (DOC601/603), and adds type annotation to
the class attribute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 31, 2026 05:31
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Warning

Review limit reached

@williaby, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 14 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f0c66670-e943-4dce-b574-8064dd443181

📥 Commits

Reviewing files that changed from the base of the PR and between ca3bfe5 and af66eb2.

📒 Files selected for processing (8)
  • .pre-commit-config.yaml
  • encryption.py
  • pyproject.toml
  • src/ledgerbase/config.py
  • src/ledgerbase/error_handlers.py
  • src/ledgerbase/models.py
  • src/ledgerbase/security.py
  • src/services/plaid_service.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/replace-darglint-with-pydoclint

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

FIPS Compatibility Check: PASSED

Metric Count
Errors 0
Warnings 0
Info 0

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates docstring linting from the archived darglint to pydoclint (Google style) and fixes the resulting 59 violations across the codebase. Since darglint wasn't actually wired into this repo, this PR is effectively net-new docstring linting plus the docstring fixups required to make it pass.

Changes:

  • Add pydoclint>=0.8.4 dev dependency, [tool.pydoclint] config block, and a pinned pre-commit hook.
  • Convert NumPy-style docstrings to Google style across encryption.py, plaid_service.py, security.py, and config.py (remove dash underlines, normalize type hints).
  • Add missing Returns: sections in error_handlers.py / config.py, fold Encryptor.__init__ docstring into the class docstring, and add type annotations to ExampleModel columns.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Adds pydoclint dev dep and configures Google style with lenient Returns/Yields.
.pre-commit-config.yaml New pinned pydoclint hook; exclude list differs from pyproject config.
encryption.py Converts NumPy- to Google-style docstrings; merges __init__ Raises into class docstring.
src/ledgerbase/config.py Adds explicit return types and signature-style hints to docstring args.
src/ledgerbase/error_handlers.py Adds Returns sections to the three error handlers.
src/ledgerbase/models.py Annotates id/name columns as int/str (misleading vs SQLAlchemy Column semantics).
src/ledgerbase/security.py Drops NumPy dash underlines, normalizes section headers.
src/services/plaid_service.py Replaces NumPy-style headers and Optional[Dict[...]] with PEP 604 union types in docstrings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ledgerbase/models.py
Comment on lines +40 to +41
id: int = db.Column(db.Integer, primary_key=True)
name: str = db.Column(db.String(50), nullable=False)
Comment thread .pre-commit-config.yaml
args: ["--config=pyproject.toml"]
types: [python]
stages: [pre-commit]
exclude: ^(tests|scripts|benchmarks|tools)/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants