PyCQA / PyCQA/pycodestyle

Show warnings for un-used `noqa` comments

Open
#871 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.2k
Forks
754
PR merge metrics
No merged PRs in 30d

Description

I did a brief search and couldn't find an issue for this.

There are cases where a noqa comment ends up left in the codebase when it is no longer needed. It would be very nice if a warning could be issued when there is a noqa statement present on a line that doesn't have the corresponding error.

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 by locating pycodestyle's noqa handling in its single Python file and reviewing any existing warning tests. Determine how an unused noqa comment should be identified and reported, then add coverage showing the warning for a comment without a corresponding error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.