Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

"redefinition of unused ..." incorrectly reported. #3

@ervandew

Description

@ervandew

Here is a small contrived example:
import os.path
import os.sys
os.path.join('foo', 'bar')
os.sys.platform

Running pyflakes on this file results in:
test.py:2: redefinition of unused 'os' from line 1
but I would expect no errors since both imports are used.

This example could obviously be rewritten to prevent the false
positive, but in some code bases, usage of fully qualified module
references can be common.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions