Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

pycodestyle is not compatible with PYTHONOPTIMIZE=2 #606

Open
mondeja opened this issue Sep 13, 2022 · 0 comments · May be fixed by #607
Open

pycodestyle is not compatible with PYTHONOPTIMIZE=2 #606

mondeja opened this issue Sep 13, 2022 · 0 comments · May be fixed by #607

Comments

@mondeja
Copy link

mondeja commented Sep 13, 2022

pycodestyle relies on function doctrings to show the linting errors. When you run a program with PYTHONOPTIMIZE=2 environment variable or the -OO option the docstrings are stripped, so the next error is raised:

... (traceback)

  File "/.../site-packages/pydocstyle/checker.py", line 160, in check_source
    partition = this_check.__doc__.partition('.\n')
AttributeError: 'NoneType' object has no attribute 'partition'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant