PyCQA / PyCQA/flake8-pyi

Check for unused imports

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

Nobody has claimed this yet.

priority-low type-feature
Dominant language
Python
Stars
83
Forks
22
PR merge metrics
No merged PRs in 30d

Description

A check that knows the special import handling in stubs. E.g.:

from x import a, b, c as c

x: b

This should complain about a being unused, but not b or c.

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

The issue names no source file or test; start by locating the existing import checks in flake8-pyi and its test coverage. Use the stub example as the initial case: report a as unused while retaining b and c, and verify the check distinguishes these special imports.

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.