chore: bump docformatter to v1.7.8#388
Open
gencurrent wants to merge 1 commit into
Open
Conversation
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 introduces stricter docstring decisions that conflict with ruff-format on a few patterns (see PyCQA/docformatter#354): - 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. The cosmetic docstring/comment cleanup that v1.7.8's defaults surface on already-conformant files was merged separately in python-cachier#385.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #388 +/- ##
=======================================
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 Harness.
🚀 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.yaml.ci.skip: [docformatter]workaround added in fix(typing): preserve decorated function type signatures with ParamSpec #376.exclude:block for 3 files where v1.7.8 disagrees withruff-format(see docformatter deadlock with ruff-format: blank lines around nested definitions PyCQA/docformatter#354).Reopens the intent of #381 over an up-to-date
master. The cosmetic docstring cleanup that #381 originally bundled is already onmastervia #385, so this PR is now scoped solely to the dependency + hook configuration change.Why
docformatter v1.7.7transitively depended on the unmaintaineduntokenizepackage, whosesetup.pyusesast.Constant.s(removed in Python 3.12+). This caused fresh installs on pre-commit.ci to fail with:PyCQA/docformatter#325 replaced
untokenizewith stdlibtokenize, and that fix shipped in v1.7.8.On the exclude block
v1.7.8 also tightened a few docstring decisions that conflict with
ruff-formaton three files:src/cachier/exporters/prometheus.py— blank lines after docstring-only function bodiestests/mongo_tests/clients.py— blank lines between module docstring and first classtests/test_varargs.py— multi-line string literals used asexec()arguments that docformatter mistakes for docstringsThese are excluded via a regex
exclude:block until upstream (PyCQA/docformatter#354) reconciles the conventions, or the local patterns are restructured. Happy to drop the exclude and restructure the patterns in a follow-up if preferred.Test plan
pre-commit run docformatter --all-filespasses locallypre-commit.ci - prcheck passesNotes