-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-inferenceWhen to infer types or require explicit annotationsWhen to infer types or require explicit annotationstopic-join-v-unionUsing join vs. using unionsUsing join vs. using unions
Description
Bug Report
Mypy incorrectly treats generic return type inferred from tuple[type[T], ...] as object
To Reproduce
Expected Behavior
Variable is recognized as int | str
Actual Behavior
Mypy error:
Argument 1 to "func_b" has incompatible type "object"; expected "int | str" Mypy(arg-type)
Your Environment
- Mypy version used: 1.19.1
- Python version used: 3.14.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-inferenceWhen to infer types or require explicit annotationsWhen to infer types or require explicit annotationstopic-join-v-unionUsing join vs. using unionsUsing join vs. using unions