mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 02:41:16 +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:
11
test_cases/stdlib/builtins/test_tuple.py
Normal file
11
test_cases/stdlib/builtins/test_tuple.py
Normal file
@@ -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