henry0312 / pytest-pydocstyle

pytest plugin to run pydocstyle
MIT License
14 stars 3 forks source link

Do not fail tests when pydocstyle fails to evaluate '__all__' #42

Closed jvesely closed 5 years ago

jvesely commented 5 years ago

Right now it results in test failure:

psyneulink/__init__.py 2019-07-27 13:51:28,757 - pydocstyle.utils - WARNING - Error in file /home/orome/PsyNeuLink/psyneulink/__init__.py: Could not evaluate contents of __all__. 
That means pydocstyle cannot decide which definitions are
public. Variable __all__ should be present at most once in
each file, in form
`__all__ = ('a_public_function', 'APublicClass', ...)`.
More info on __all__: http://stackoverflow.com/q/44834/. ')

FAILED

pydocstyle does no understand more complex __all__ expressions like:

__all__ = list(foo)
__all__.extend(submodule.__all__)
henry0312 commented 5 years ago

How can I reproduce the issue? Please give me some examples (codes).

jvesely commented 5 years ago

Hi, I can't reproduce it either. I've checked older versions of pydocstyle and this problem appears fixed in pydocstyle>=3.00.

thanks, Jan