pyright icon indicating copy to clipboard operation
pyright copied to clipboard

Added logic to expand promotion types for `float` and `complex` when …

Open erictraut opened this issue 1 year ago • 1 comments

…these types are used in a member access expression (i.e. the LHS of a "dot" operator).

erictraut avatar May 30 '24 01:05 erictraut

Diff from mypy_primer, showing the effect of this PR on open source code:

dd-trace-py (https://github.com/DataDog/dd-trace-py)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/appsec/_iast/_taint_tracking/aspects.py:479:39 - error: Argument of type "str | memoryview" cannot be assigned to parameter "sub" of type "str" in function "index"
-     Type "str | memoryview" is incompatible with type "str"
-       "memoryview" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/dd-trace-py/ddtrace/llmobs/_integrations/bedrock.py
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/llmobs/_integrations/bedrock.py:43:13 - error: Argument of type "int" cannot be assigned to parameter "value" of type "float" in function "__setitem__"
+     "int" is incompatible with "float" (reportArgumentType)
+   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/botocore/test_bedrock_llmobs.py:87:13 - error: Argument of type "int" cannot be assigned to parameter "value" of type "float" in function "__setitem__"
+     "int" is incompatible with "float" (reportArgumentType)
- 11158 errors, 528 warnings, 0 informations 
+ 11159 errors, 528 warnings, 0 informations 

github-actions[bot] avatar May 30 '24 01:05 github-actions[bot]