Skip to content

[pyflakes] F401 cannot detect unused import #22554

@chirizxc

Description

@chirizxc

Summary

I discovered this when I opened this* in Pycharm

Image

PyCharm:

Image

Pyflakes:

❯ pyflakes xxx.py                                                                                                                              
xxx.py:43:5: redefinition of unused 'Context' from line 23     

Ruff:

❯ ruff check xxx.py --select F401 --preview                                                                                                    
All checks passed!

Version

ruff 0.14.11 (c920cf8cd 2026-01-08)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for support or clarificationruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions