Skip to content

Conversation

@sobolevn
Copy link
Member

From #9158 I understood that explicit type aliases are not a goal. But, this one is special. It has a TODO item and some history to it.

I am also curious about whether mypy now supports it.

@sobolevn
Copy link
Member Author

stdlib/builtins.pyi:195: error: Unsupported left operand type for | ("object") [operator]

Not today!

@sobolevn sobolevn closed this Nov 12, 2022
@github-actions
Copy link
Contributor

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

Expression (https://github.com/cognitedata/Expression)
+ expression/collections/block.py:317: error: Incompatible return value type (got "int", expected "Union[_TSourceSum, Literal[0]]")  [return-value]
+ expression/collections/block.py:1036: error: Incompatible return value type (got "int", expected "Union[_TSourceSum, Literal[0]]")  [return-value]
+ expression/collections/block.py:1043: error: Incompatible return value type (got "int", expected "Union[_TSourceSum, Literal[0]]")  [return-value]

ignite (https://github.com/pytorch/ignite)
+ ignite/handlers/time_profilers.py:607: error: Incompatible types in assignment (expression has type "float", variable has type "int")  [assignment]

@AlexWaygood
Copy link
Member

I am also curious about whether mypy now supports it.

I haven't checked yet, but I wonder if python/mypy#14008 might have fixed this bug (not yet released, will be released as part of mypy 1.0).

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.

2 participants