Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sean-moore3 opened this issue Jan 18, 2022 · 3 comments

Comments

@sean-moore3
Copy link

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
@mshafer-NI
Copy link
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...)

@sean-moore3
Copy link
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

@mshafer-NI
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants