PyCQA / pydocstyle

docstring style checker
http://pydocstyle.org
MIT License
1.11k stars 188 forks source link

6.2.2 release seems to break pytest-pydocstyle #620

Closed odoublewen closed 1 year ago

odoublewen commented 1 year ago

After the recent release of pydocstyle 6.2.0 my project CI broke, due to:

_ ERROR collecting test session ____ .venv/lib/python3.10/site-packages/pluggy/_hooks.py:265: in call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) .venv/lib/python3.10/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) .venv/lib/python3.10/site-packages/pytest_pydocstyle.py:50: in pytest_collectfile for filename, , _ in parser.get_files_to_check(): E ValueError: too many values to unpack (expected 3)

If I pin pydocstyle back to 6.1.1, the problem goes away. (This is using pytest-pydocstyle==2.3.1).

I know I am not providing a reproducible problem here. I don't have time at the moment but thought it might be useful to have this early report. I can try to generate a toy example with the error condition if there is interest.

This could easily be a problem in pytest-pydocstyle.

sigmavirus24 commented 1 year ago

Every line of the stack trace comes from the pytest plugin. I'm sure an internal API changed here that the plugin was relying on, but I doubt it was intended for use by a third party

dclimber commented 1 year ago

Same error in flake8-pydocstyle

Traceback example:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/.cache/pre-commit/repo1jg7k17q/py_env-python3/lib/python3.8/site-packages/flake8_pydocstyle/plugin.py", line 79, in run
    checked_codes, ignore_decorators = _files_options[self.filename]
ValueError: too many values to unpack (expected 2)
"""
samj1912 commented 1 year ago

Seems to be related to https://github.com/PyCQA/pydocstyle/pull/546 where the function signature of the configuration parser changed.

samj1912 commented 1 year ago

We can't do much about it here from the pydocstyle repo. Please follow up with pytest pydocstyle to either pin to an appropriate version or update their usage of the pydocstyle library.