Skip to content

Replace docformatter with pydocstringformatter#1518

Merged
adamtheturtle merged 1 commit intomainfrom
replace-docformatter-with-pydocstringformatter
Jan 26, 2026
Merged

Replace docformatter with pydocstringformatter#1518
adamtheturtle merged 1 commit intomainfrom
replace-docformatter-with-pydocstringformatter

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Jan 26, 2026

Replace docformatter with pydocstringformatter.

This follows the same pattern as VWS-Python/vws-python#2793.

Changes:

  • Replace docformatter==1.7.7 with pydocstringformatter==0.7.3
  • Update tool configuration in pyproject.toml
  • Update ruff ignore rules (D200 → D205, D212)
  • Format docstrings with new tool
  • Workaround URL breaking issue by isolating URLs on their own lines where needed

Note

Replaces the docstring formatter and aligns configs and ignores accordingly.

  • Replace docformatter with pydocstringformatter in pyproject.toml and add [tool.pydocstringformatter] config
  • Update .pre-commit-config.yaml hook from docformatter to pydocstringformatter
  • Adjust Ruff ignores (drop D200 globally; ignore D205, D212; per-file ignore for D200 in doccmd_*.py)
  • Reformat docstrings in src/, tests/, and docs/ to new style (one-line summaries, wrapped lines)
  • Remove old tool.docformatter settings

Written by Cursor Bugbot for commit fd7b96b. This will update automatically on new commits. Configure here.

@adamtheturtle adamtheturtle force-pushed the replace-docformatter-with-pydocstringformatter branch from 3da3a3c to 4bff8da Compare January 26, 2026 11:37
@adamtheturtle adamtheturtle force-pushed the replace-docformatter-with-pydocstringformatter branch from 53b327a to 5de2f56 Compare January 26, 2026 11:41
@adamtheturtle adamtheturtle force-pushed the replace-docformatter-with-pydocstringformatter branch from 9912e12 to 396c074 Compare January 26, 2026 11:47
- Replace docformatter==1.7.7 with pydocstringformatter==0.7.3
- Replace [tool.docformatter] with [tool.pydocstringformatter] config
- Update ruff ignore comments (D200 -> D205/D212)
- Don't use linewrap-full-docstring to avoid breaking URLs
  (DanielNoord/pydocstringformatter#540)
@adamtheturtle adamtheturtle force-pushed the replace-docformatter-with-pydocstringformatter branch from 396c074 to fd7b96b Compare January 26, 2026 11:52
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

lint.per-file-ignores."doccmd_*.py" = [
# Allow our chosen docstring line-style - pydocstringformatter handles
# formatting but docstrings in docs may not match this style.
"D200",
Copy link

Choose a reason for hiding this comment

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

D200 ignore pattern misses docs/source/doccmd files

Low Severity

The ruff per-file-ignores pattern doccmd_*.py only matches root-level files, not files in subdirectories like docs/source/doccmd_*.py. The pylint config (line 247) shows the project expects files matching docs/source/doccmd_*.py to exist. Before this PR, D200 was globally ignored so all doccmd files were covered. Now only root-level doccmd files have D200 ignored, creating a gap where docs/source/doccmd_*.py files could trigger D200 violations. The pattern could be changed to **/doccmd_*.py or a separate entry added for docs/source/doccmd_*.py.

Fix in Cursor Fix in Web

@adamtheturtle adamtheturtle merged commit 5e03e8c into main Jan 26, 2026
7 checks passed
@adamtheturtle adamtheturtle deleted the replace-docformatter-with-pydocstringformatter branch January 26, 2026 12:01
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.

1 participant