-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Mypy crashes if there is no 'function' or 'module' in builtins #2765
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
Comments
function
in builtins
The same applies to |
The reason mypy has these fake definitions in builtins is to get tidier error messages. We could instead translate |
Having |
The module part of this issue is fixed by #3107 |
I believe |
@vlasovskikh So I think this is something still worth fixing. I would prefer to use |
This is essentially the same as #8240 (thanks Alex for pointing me to it) |
You can use
types.FunctionType
instead ofbuiltins.function
. See the original crash in the CI results here python/typeshed#876.The text was updated successfully, but these errors were encountered: