Skip to content

extend-ignore option of the lint subcommand is not configurable via pyproject.toml #76

Open

Description

@sean-moore3

The --extend-ignore option is currently only honored when passed via the command line. It is not honored if an extend-ignore option is added to the tool.ni-python-styleguide section of pyproject.toml.

This simple test when added to the test suite will fail:

def test_extend_ignore(styleguide_lint_with_options, tmp_path):
    (tmp_path / "dir1").mkdir()
    (tmp_path / "dir1" / "spam.py").write_text(TOO_LONG_LINE)

    result = styleguide_lint_with_options(lint_args={"extend-ignore": "D100,BLK100"})

    assert result, result.output

Activity

  1. mshafer-NI commented on Apr 1, 2022

    @mshafer-NI
    Collaborator

    It is not honored if an extend-ignore option is added to the tool.ni-python-styleguide section of pyproject.toml.

    This is not a documented feature (nor am I sure we should add it...)

  2. sean-moore3 commented on Apr 1, 2022

    @sean-moore3
    Author

    Without it we have to do something like this to ignore error codes on docstrings according to the pydocstyle documentation
    This is a consequence of the tool specifying all for it's docstring-convention.

    docstring-convention=all

  3. mshafer-NI commented on Apr 1, 2022

    @mshafer-NI
    Collaborator

    We plan to revive #42, which will remove this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions