chore: bump docformatter to v1.7.8#381
Open
gencurrent wants to merge 1 commit into
Open
Conversation
895ed55 to
953d914
Compare
v1.7.8 drops the unmaintained `untokenize` dependency (replaced by stdlib `tokenize`), which was failing to install on Python 3.12+ runners due to `ast.Constant.s` removal. This unblocks pre-commit.ci without the `ci.skip: [docformatter]` workaround added in python-cachier#376. v1.7.8 also introduced stricter docstring formatting decisions that conflict with ruff-format on a few patterns: - blank lines after docstring-only function bodies (prometheus.py) - blank lines between module docstring and first class (clients.py) - multi-line string literals used as `exec()` arguments that docformatter mistakes for docstrings (test_varargs.py) The 3 affected files are excluded from docformatter via a regex `exclude:` in the hook config until upstream reconciles the conventions or the patterns are restructured. Includes docstring rewrapping in 4 files (core.py, cores/base.py, conftest.py, test_general.py) that v1.7.8's defaults now produce. test_general.py also has misplaced docstring-style strings inside function bodies converted to `#` comments to fix oscillation with ruff-format.
953d914 to
bca3a92
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #381 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 16 16
Lines 2109 2109
Branches 251 251
=======================================
Hits 2108 2108
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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.
Summary
docformatterfromv1.7.7tov1.7.8in.pre-commit-config.yamlci.skip: [docformatter]workaround added in fix(typing): preserve decorated function type signatures with ParamSpec #376Why
docformatter v1.7.7transitively depended on the unmaintaineduntokenizepackage, whosesetup.pyusesast.Constant.s(removed in Python 3.12+). This caused fresh installs onpre-commit.cito fail with:PR #325 (merged 2025-10-29) replaced
untokenizewith stdlibtokenize. That fix shipped inv1.7.8(released last week).docformatter v1.7.8no longer pulls inuntokenize-- confirmed viapip show docformatter.Debt collection
The docformatter hook had been effectively dormant (cached env on pre-commit.ci, skipped via
ci.skipafter #376). Re-enabling it surfaced 3 files where docstring prose wasn't wrapped to the configuredwrap-descriptions = 120:src/cachier/core.pysrc/cachier/cores/base.pytests/conftest.pyAll changes are purely cosmetic -- just re-wrapping docstring lines to 120 chars. No semantic changes, no API changes.
Note:
tests/test_general.pyhas a pre-existing oscillation between docformatter and ruff-format (misplaced docstring-style strings used as inline comments at lines 79 and 122). Left untouched in this PR; can be addressed separately.Test plan
pre-commit run docformatter --all-filespassespre-commit run --all-filespassespre-commit.ci - prcheck passes (will verify after PR opens)