-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Improve CallableType join in simple cases #18406
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
base: master
Are you sure you want to change the base?
Conversation
Fixes python#17479 , although as you can see in the test case the logic still remains far from perfect
This comment has been minimized.
This comment has been minimized.
|
ddtrace: prefect: |
This comment has been minimized.
This comment has been minimized.
662d49e to
d11ee1d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Diff from mypy_primer, showing the effect of this PR on open source code: prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/cli/profile.py:180: error: Cannot call function of unknown type [operator]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/internal/schema/__init__.py:43: error: Value of type "object" is not indexable [index]
+ ddtrace/internal/schema/__init__.py:44: error: Value of type "object" is not indexable [index]
+ ddtrace/internal/schema/__init__.py:45: error: Value of type "object" is not indexable [index]
+ ddtrace/internal/schema/__init__.py:46: error: Value of type "object" is not indexable [index]
+ ddtrace/internal/schema/__init__.py:47: error: Value of type "object" is not indexable [index]
+ ddtrace/internal/schema/__init__.py:48: error: Value of type "object" is not indexable [index]
+ ddtrace/internal/schema/__init__.py:49: error: Value of type "object" is not indexable [index]
+ ddtrace/internal/schema/__init__.py:50: error: Value of type "object" is not indexable [index]
+ ddtrace/_trace/utils_valkey.py:35: error: Unused "type: ignore" comment [unused-ignore]
|
|
Fixed some stuff, this looks good now. Fixes two false positives. Better inference leads to one new false positive, but really it should have an annotation and it will make subsequent inference for calls better |
Fixes #17479 , although as you can see in the test case the logic still remains far from perfect