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

pycodestyle is not compatible with PYTHONOPTIMIZE=2 #606

@mondeja

Description

@mondeja

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions