mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-17 03:21:25 +08:00
Revert "add overload to tuple.__new__ to better express an empty tuple" (#8278)
This reverts commit 64554bdd5d.
Also add a test case.
This commit is contained in:
1 parent
2a1b33df9f
commit
2a7439e106
2 files changed
+12
-6
No files matched your search
@@ -0,0 +1,11 @@
|
||||
from typing_extensions import assert_type
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
# Empty tuples, see #8275
|
||||
class TupleSub(Tuple[int, ...]):
|
||||
pass
|
||||
|
||||
|
||||
assert_type(TupleSub(), TupleSub)
|
||||
assert_type(TupleSub([1, 2, 3]), TupleSub)
|
||||
Reference in new issue
Block a user