ni / ni/python-styleguide

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

Open
#76 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
21
Forks
20
Avg merge
22h 9m
Merged PRs (30d)
3

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the lint test suite and the provided test_extend_ignore case, using the styleguide_lint_with_options fixture. Check how the tool.ni-python-styleguide section of pyproject.toml is read and how extend-ignore from lint_args is handled. Done means the test passes when extend-ignore is configured in pyproject.toml, including D100 and BLK100.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.