Skip to content

Discover .docformatter.toml for tool-specific settings - #422

Merged
weibullguy merged 1 commit into
PyCQA:masterfrom
yushuosun:feat/dedicated-toml
Dec 3, 2026
Merged

weibullguy merged 1 commit into
PyCQA:masterfrom
yushuosun:feat/dedicated-toml

Conversation

@yushuosun

Copy link
Copy Markdown
Contributor

Fixes #212. A project can now keep formatter settings in a dedicated TOML file that editors, pre-commit, and the CLI all discover in the working directory. The file uses the existing [tool.docformatter] table. When both files exist the dedicated file takes precedence, and an explicit --config still wins.

The discovery test originally selected wrap width 71 from pyproject.toml instead of 43 from the dedicated file. Both precedence cases now pass. Linux (Python 3.14.4): 820 passed, 3 skipped. Windows (Python 3.13.14): all 68 configuration tests passed. The initial full Windows run had 29 setup errors in Unix virtualenv fixtures and one line-ending failure.

Copilot AI balanced review requested due to automatic review settings November 29, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@weibullguy
weibullguy merged commit 2766150 into PyCQA:master Dec 3, 2026
7 checks passed
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.

[FR][UX] Dedicated config location possibility: .docformatter.toml

3 participants