-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Mypy false positive: Name "asgi" already defined (by an import) #1162
Comments
So, I think this is more of a "questionable design choice" on our end as it's a bug. Proper resolution IMO would be to rename |
Yep, its ambiguous as it is. I can't see why changing the module name should be that big a deal as most would be importing from the package namespace.
I think we'll have to for |
Sure |
* Rename handler modules to disambiguate from decorator names. Closes #1162 * Update module refs in docs.
I'm getting these errors from
pre-commit run mypy --all-files
.static_files.py
importsasgi
withfrom starlite.handlers import asgi
, if I change that tofrom starlite.handlers.asgi import asgi
the issue goes away.Obviously smth to do with the fact that the name of the decorator is the same as the name of the module, but looking at
starlite.handlers.__init__
, the imports seem defined properly.I think this is the relevant issue: python/mypy#7203
The text was updated successfully, but these errors were encountered: