diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index aebe9c8b64..de624f2e54 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -512,6 +512,10 @@ def __getitem__(self, item): new_args = (t_args, t_result) return _CallableGenericAlias(Callable, tuple(new_args)) + # TODO: RUSTPYTHON patch for common call + def __or__(self, other): + super().__or__(other) + def _is_param_expr(obj): """Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or ``_ConcatenateGenericAlias`` from typing.py diff --git a/extra_tests/snippets/stdlib_typing.py b/extra_tests/snippets/stdlib_typing.py new file mode 100644 index 0000000000..ddc30b6846 --- /dev/null +++ b/extra_tests/snippets/stdlib_typing.py @@ -0,0 +1,10 @@ +from collections.abc import Awaitable, Callable +from typing import TypeVar + +T = TypeVar("T") + + +def abort_signal_handler( + fn: Callable[[], Awaitable[T]], on_abort: Callable[[], None] | None = None +) -> T: + pass
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: