-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Get rid of make_simplified_union() except in error messages #8624
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
Labels
bug
mypy got something wrong
performance
priority-1-normal
refactoring
Changing mypy's internals
topic-union-types
Comments
Ideally there would be a test case to ensure #9169 won't happen again once the refactoring is done |
I've noticed that
We probably need to reconsider the necessity and ways to refactor |
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…binder.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…checker.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…checkexpr.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…checkmember.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…checkpattern.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…erasetype.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…meet.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…plugins/attrs.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…plugins/ctypes.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…plugins/default.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…plugins/enums.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…semanal_shared.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…typeops.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in typeops.py, as part of the codebase modernization and consistency improvements proposed in issue python#8624.
lsrafael13
added a commit
to lsrafael13/mypy
that referenced
this issue
May 4, 2025
…suggestions.py (python#8624) This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue python#8624.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
mypy got something wrong
performance
priority-1-normal
refactoring
Changing mypy's internals
topic-union-types
It used to cause various issues and is still causing known bugs (like false negatives in per-file strict optional when
map_instance_to_supertype()
is involved). Ideally we should replace all calls to it (except in error message formatting code) withUnionType.make_union()
. Union constructor already flattens nested unions, we can also make it remove exact duplicates minimize perf impact.The text was updated successfully, but these errors were encountered: