Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find qualified name for module: file.py #29

Open
cgahr opened this issue Mar 18, 2022 · 1 comment
Open

Unable to find qualified name for module: file.py #29

cgahr opened this issue Mar 18, 2022 · 1 comment

Comments

@cgahr
Copy link

cgahr commented Mar 18, 2022

Hi,

since version 3.0.0, I get a the error Unable to find qualified name for module: file.py. when I run flake8.

How to reproduce

  • Directory Structure:
test/
└── file.py

file.py:

import numpy as np

print("Oh no!")
  • Expected Result:
> flake8 .
./file.py:1:1: F401 'numpy as np' imported but unused

running flake8 . actually works:

  • Actual Result:
> flake8 file.py
Unable to find qualified name for module: file.py
file.py:1:1: F401 'numpy as np' imported but unuse

Running flake8 file.py does not work. As you can see, flake8 throws Unable to find qualified name for module: file.py.

  • Additional Informations:
    • when I remove flake8-bandit from my environment, the error disappears
    • I'm using flake8 4.0.1 and flake8-bandit 3.0.0.

I'm looking forward to your reply.

C

@sundaymtn
Copy link

I was able to make this error go away for noxfile.py by putting ./ in front of that filename in my .flake8 configuration file
locations = "src", "tests", "./noxfile.py"

previously the line was
locations = "src", "tests", "noxfile.py"
which resulted in
Unable to find qualified name for module: noxfile.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants