Closed yajo closed 1 year ago
This change is causing pre-commit to emit a warning:
$ pre-commit run --all-files
[WARNING] Unexpected key(s) present on https://github.com/pycqa/pydocstyle => pydocstyle: pass_file_names
It looks like the correct spelling of the option is pass_filenames
:
https://pre-commit.com/#hooks-pass_filenames
Is this change actually working as expected?
Also, this appears to change the documented behavior here: https://www.pydocstyle.org/en/stable/usage.html#usage-with-the-pre-commit-git-hooks-framework
Checked-in python files will be passed as positional arguments so no need to use
--match=*.py
. You can also use command line arguments instead of configuration files to achieve the same effect with less files.
If that's changing then the documentation needs an update and possibly instructions for how to get the old behavior:
- repo: https://github.com/pycqa/pydocstyle
rev: 6.2.3
hooks:
- id: pydocstyle
pass_filenames: true
Should I move my comments here to a new issue? I noticed that a revert commit has been opened and closed a couple times now.
This commit has been reverted.
Thanks! By the way, I discovered accidentally that the underlying issue that motivated this PR might have already been addressed. Please see my comment here: https://github.com/PyCQA/pydocstyle/issues/111#issuecomment-1374921227
Aha, I was still seeing the error in pre-commit because this:
- repo: https://github.com/pycqa/pydocstyle
rev: 6.2.3
hooks:
- id: pydocstyle
gets the broken config from the 6.2.3 release. Reverting my config to 6.2.2 works around the problem.
This is the only way pydocstyle will obey its own match rules.
Thanks for submitting a PR!
Please make sure to check for the following items:
If you've added an error code or changed an error code behavior, you should probably add or change a test case file under
tests/test_cases/
and add it to the list undertests/test_definitions.py
.If you've added or changed a command line option, you should probably add or change a test in
tests/test_integration.py
.Make sure to include the PR number after you open and get one.
Please don't get discouraged as it may take a while to get a review.