callable __or__ patch

This commit is contained in:
Ashwin Naren authored and Jeong YunWon committed 2025-06-29 14:04:00 +09:00
1 parent 7a6e5c465f
commit 0a1c8c3c7e
1 file changed
+4
+4
View File
@@ -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