mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add weakref_slot parameter to @dataclass decorator (#7772)
https://github.com/python/cpython/pull/92160
This commit is contained in:
@@ -79,7 +79,23 @@ else:
|
||||
@overload
|
||||
def dataclass(_cls: None) -> Callable[[type[_T]], type[_T]]: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
if sys.version_info >= (3, 11):
|
||||
@overload
|
||||
def dataclass(
|
||||
*,
|
||||
init: bool = ...,
|
||||
repr: bool = ...,
|
||||
eq: bool = ...,
|
||||
order: bool = ...,
|
||||
unsafe_hash: bool = ...,
|
||||
frozen: bool = ...,
|
||||
match_args: bool = ...,
|
||||
kw_only: bool = ...,
|
||||
slots: bool = ...,
|
||||
weakref_slot: bool = ...,
|
||||
) -> Callable[[type[_T]], type[_T]]: ...
|
||||
|
||||
elif sys.version_info >= (3, 10):
|
||||
@overload
|
||||
def dataclass(
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user