Replies: 1 comment 1 reply
-
Which version of mypy are you using? Version prior to 0.930 (or 0.920?) had problems with tuples of the form |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I am puzzled about this, why prior assignment of type is giving me this error while explicit annotation worked?
test.py:5: error: Unexpected "..."
YY = tuple[int, ...]_
from typing import Tuple
YY = tuple[int, ...]
def it_works_fine(par: tuple[int, ...] = (1, 1,) ) -> bool:
"""."""
return par == (1,1, )
def doesnt_work(par: YY = (1,1,) ) -> bool:
return par == (1,1, )
def doesnt_work_neither(par: tuple[int, ...] = (1, 1,) ) -> YY:
return par
Beta Was this translation helpful? Give feedback.
All reactions