mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
use __new__ instead of __init__ for frozenset (#8019)
This commit is contained in:
@@ -1101,9 +1101,9 @@ class set(MutableSet[_T], Generic[_T]):
|
||||
|
||||
class frozenset(AbstractSet[_T_co], Generic[_T_co]):
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
def __new__(cls: type[Self]) -> Self: ...
|
||||
@overload
|
||||
def __init__(self, __iterable: Iterable[_T_co]) -> None: ...
|
||||
def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...
|
||||
def copy(self) -> frozenset[_T_co]: ...
|
||||
def difference(self, *s: Iterable[object]) -> frozenset[_T_co]: ...
|
||||
def intersection(self, *s: Iterable[object]) -> frozenset[_T_co]: ...
|
||||
|
||||
Reference in New Issue
Block a user