Skip to content

Fixed bug that causes bidirectional type inference to be skipped whe…#10577

Merged
erictraut merged 1 commit intomainfrom
issue-10539-2
Jun 9, 2025
Merged

Fixed bug that causes bidirectional type inference to be skipped whe…#10577
erictraut merged 1 commit intomainfrom
issue-10539-2

Conversation

@erictraut
Copy link
Collaborator

…n the target of an assignment is a member access expression (base.member) and the base expression is a module. This addresses #10539.

… the target of an assignment is a member access expression (`base.member`) and the base expression is a module. This addresses #10539.
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2025

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

sympy (https://github.com/sympy/sympy)
+   .../projects/sympy/sympy/utilities/matchpy_connector.py:288:16 - error: Type "Basic" is not assignable to declared type "Expr"
+     "Basic" is not assignable to "Expr" (reportAssignmentType)
- 33296 errors, 74 warnings, 0 informations 
+ 33297 errors, 74 warnings, 0 informations 

zulip (https://github.com/zulip/zulip)
+     Type "_StrOrPromise" is not assignable to type "Iterable[Any] | Container[Any]"
+       Type "_StrPromise" is not assignable to type "Iterable[Any] | Container[Any]"
+         "_StrPromise" is incompatible with protocol "Iterable[Any]"
+           "__iter__" is not present
+         "_StrPromise" is incompatible with protocol "Container[Any]"
+           "__contains__" is an incompatible type
+             Type "(o: str, /) -> bool" is not assignable to type "(x: object, /) -> bool" (reportArgumentType)
+   .../projects/zulip/zerver/tests/test_email_notifications.py:155:60 - error: Argument of type "_StrOrPromise" cannot be assigned to parameter "container" of type "Iterable[Any] | Container[Any]" in function "assertIn"
- 4329 errors, 359 warnings, 0 informations 
+ 4330 errors, 359 warnings, 0 informations 

@erictraut erictraut merged commit a52db80 into main Jun 9, 2025
17 checks passed
@erictraut erictraut deleted the issue-10539-2 branch June 9, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant