chore: restore a green pre-commit run - #382
Open
Eljees wants to merge 1 commit into
Open
Conversation
pydocstyle D301 on _is_blank_line, mypy on the tomllib ImportError fallback, and end-of-file-fixer on CHANGELOG.md all fail on master, so the "Run linters on code base" job is red for every pull request.
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.
Run linters on code basefails onmasteritself (run on d5c7b77), so no pull request in this repository gets a usable signal out of that job. Three hooks are red.pydocstyle -
src/docformatter/classify.py:481_is_blank_linespells out"\n"and" \n"in its docstring, so it needs an r-string. That one is mine, from #369 - sorry. The rendered text does not change:"\\n"in a plain docstring and"\n"in a raw one are the same two characters.mypy -
src/docformatter/configuration.py:46The
ImportErrorfallback from #371 assignsNoneto a name mypy has already bound to a module. A targeted# type: ignore[assignment]is the usual spelling for an optional import. I first tried declaringtomllib: Optional[ModuleType]above thetry, which mypy accepts, but that puts a statement ahead offrom docformatter import __pkginfo__and ruff then reportsE402.end-of-file-fixer -
CHANGELOG.mdcarries three trailing blank lines.One thing worth flagging:
CHANGELOG.mdis regenerated byheinrichreimer/github-changelog-generator-actionindo-release.ymland pushed straight tomasterbyEndBug/add-and-commit, so it never passes through pre-commit and those blank lines will come back at the next release. If you would rather not re-strip them every time, addingCHANGELOG.mdtoexclude:in.pre-commit-config.yamlwould settle it for good - happy to do that here instead, whichever you prefer.Checked against the pinned hook versions - pydocstyle 6.3.0, mypy 1.20.1, black 26.3.1, isort 8.0.1, ruff 0.15.11, eradicate 3.0.1 and docformatter's own hook all come back clean.
pytest tests/is 509 passed, 4 skipped, identical tomaster.