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

Local namespace not detected #79

Open
Crown0815 opened this issue Jan 9, 2024 · 1 comment
Open

Local namespace not detected #79

Crown0815 opened this issue Jan 9, 2024 · 1 comment

Comments

@Crown0815
Copy link

I have a repository that looks something like this:

- src
    - ...
- unittests
    - mocks
        - mock_module.py
    - test_module.py

and in my test_module.py I

from unittests.mocks.mock_module import MyMock

and I receive

I900 'unittests' not listed as a requirement

Am I missing something?

@arkq
Copy link
Owner

arkq commented Feb 3, 2024

from unittests.mocks.mock_module import MyMock

This statement means that you want to load something from the unittests module. If such module is not in your project dependencies, then you will see the "not listed" warning. In case your project provides more then one module (and it is clearly stated in the setup), please provide your setup config, so I could reproduce the bug. Otherwise, you can add add custom module for your project with known-modules: https://github.com/arkq/flake8-requirements?tab=readme-ov-file#customization

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