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

<directory> is not a valid python package name #10515

Closed
matthieudesprez opened this issue May 21, 2021 · 2 comments
Closed

<directory> is not a valid python package name #10515

matthieudesprez opened this issue May 21, 2021 · 2 comments
Labels
bug mypy got something wrong

Comments

@matthieudesprez
Copy link

Migrating from 0.790 to 0.812, we are experiencing issues running mypy because we have an init.py file at the root of our project, and our project repository contains a dash in it's name.

I believe it comes from this PR #9614 which seems to change the way modules are crawled

Is there some option we can pass to prevent mypy to throw an error during this step ?

We are thinking about renaming the project root folder or moving all our code in a subfolder but any other solution would be appreciated

@matthieudesprez matthieudesprez added the bug mypy got something wrong label May 21, 2021
@hauntsaninja
Copy link
Collaborator

Maybe remove the __init__.py?

@matthieudesprez
Copy link
Author

matthieudesprez commented May 24, 2021

Wow now I feel dumb, thanks for the suggestion @hauntsaninja

I thought this __init__.py file was needed to ease import across our different packages, but it seems it could be safely removed.

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

No branches or pull requests

2 participants