mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
PEP 604: Add ror operator and modify isinstance and subclass (#5509)
Add operators or and ror for types.Union and ror to the type class. Also, add modified isinstance and issubclass signatures to support old-style and new-style unions inside.
This commit is contained in:
@@ -352,3 +352,5 @@ if sys.version_info >= (3, 10):
|
||||
NotImplementedType = _NotImplementedType # noqa F811 from builtins
|
||||
class Union:
|
||||
__args__: Tuple[Any, ...]
|
||||
def __or__(self, obj: Any) -> Union: ...
|
||||
def __ror__(self, obj: Any) -> Union: ...
|
||||
|
||||
Reference in New Issue
Block a user