PEP 681: Fix type annotation of field_descriptors param (#2296)

This commit is contained in:
Erik De Bonte 2022-02-02 09:46:55 -08:00 committed by GitHub
parent 74272d5238
commit de3626fe40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -203,7 +203,7 @@ customization of default behaviors:
eq_default: bool = True,
order_default: bool = False,
kw_only_default: bool = False,
field_descriptors: Tuple[type, ...] = (()),
field_descriptors: tuple[type | Callable[..., Any], ...] = (),
) -> Callable[[_T], _T]: ...
* ``eq_default`` indicates whether the ``eq`` parameter is assumed to
@ -556,7 +556,7 @@ following declaration within their type stubs or source files:
eq_default: bool = True,
order_default: bool = False,
kw_only_default: bool = False,
field_descriptors: Tuple[Union[type, Callable[..., Any]], ...] = (()),
field_descriptors: tuple[type | Callable[..., Any], ...] = (),
) -> Callable[[_T], _T]:
# If used within a stub file, the following implementation can
# be replaced with "...".