From 0a1c8c3c7eb414aaec6d82a415b942eb92f07acb Mon Sep 17 00:00:00 2001 From: Ashwin Naren Date: Sun, 27 Apr 2025 16:58:19 -0700 Subject: [PATCH] callable __or__ patch --- Lib/_collections_abc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index aebe9c8b6..de624f2e5 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -512,6 +512,10 @@ class _CallableGenericAlias(GenericAlias): 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