-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
--disallow-untyped-calls allows calling values with Any type #5968
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
Tagging as a usability bug since this can be a major distraction in annotation workflows. |
I'm working on a solution, but doing this results in self-check failure. I investigated the cause: The failure happens because some functions are annotated with return type |
@onlined What about useing |
There are 244 failures. |
Can you give some examples? If there are that many failures, |
These are some of the failures:
|
@JukkaL What should we do about this? |
I sampled a few and these don't look like calls to untyped functions. In some cases the callee has an overloaded type, and in another case it was a union of callables. All of these seemed valid for |
Yes, now I realize that it's my fault. I am working on it! |
I reduced it to 137 failures, they are related to lack of information in the stubs. For example:
These failures are caused because |
We are planning to improve the signature of |
The |
The calls to
f
andff
below aren't rejected when using--disallow-untyped-calls
, even though I believe that they should be:At the very least the first call should probably be caught. If
non_existent
gets added in the build with no type annotations, it would start generating errors. However, I'd expect that adding a module to the build should result in fewer Any-related errors, not more.Marking this a high priority since I've been bit by this twice in production code.
The text was updated successfully, but these errors were encountered: