mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 05:11:09 +08:00
Add typings for bool __{r,}{and,or,xor}__ (#1795)
This commit is contained in:
committed by
Jelle Zijlstra
parent
64ca731d0b
commit
03044212d4
@@ -472,6 +472,30 @@ class bytearray(MutableSequence[int]):
|
||||
|
||||
class bool(int):
|
||||
def __init__(self, o: object = ...) -> None: ...
|
||||
@overload # type: ignore
|
||||
def __and__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __and__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __or__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __or__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __xor__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __xor__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __rand__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __rand__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __ror__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __ror__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __rxor__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __rxor__(self, x: int) -> int: ...
|
||||
|
||||
class slice(object):
|
||||
start = ... # type: Optional[int]
|
||||
|
||||
@@ -537,6 +537,30 @@ class memoryview(Sized, Container[bytes]):
|
||||
|
||||
class bool(int):
|
||||
def __init__(self, o: object = ...) -> None: ...
|
||||
@overload # type: ignore
|
||||
def __and__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __and__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __or__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __or__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __xor__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __xor__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __rand__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __rand__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __ror__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __ror__(self, x: int) -> int: ...
|
||||
@overload # type: ignore
|
||||
def __rxor__(self, x: bool) -> bool: ...
|
||||
@overload # type: ignore
|
||||
def __rxor__(self, x: int) -> int: ...
|
||||
|
||||
class slice:
|
||||
start = ... # type: Optional[int]
|
||||
|
||||
Reference in New Issue
Block a user