mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Make all function annotations accessible from builtins complete
This commit is contained in:
@@ -48,7 +48,9 @@ class type:
|
||||
def __init__(self, o: object) -> None: ...
|
||||
@overload
|
||||
def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any]) -> None: ...
|
||||
@staticmethod
|
||||
@overload
|
||||
def __new__(cls, o: object) -> type: ...
|
||||
@overload
|
||||
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
|
||||
|
||||
class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
|
||||
@@ -224,10 +226,10 @@ class str(Sequence[str]):
|
||||
def zfill(self, width: int) -> str: ...
|
||||
@staticmethod
|
||||
@overload
|
||||
def maketrans(self, x: Union[Dict[int, Any], Dict[str, Any]]) -> Dict[int, Any]: ...
|
||||
def maketrans(x: Union[Dict[int, Any], Dict[str, Any]]) -> Dict[int, Any]: ...
|
||||
@staticmethod
|
||||
@overload
|
||||
def maketrans(self, x: str, y: str, z: str = ...) -> Dict[int, Any]: ...
|
||||
def maketrans(x: str, y: str, z: str = ...) -> Dict[int, Any]: ...
|
||||
|
||||
def __getitem__(self, i: Union[int, slice]) -> str: ...
|
||||
def __add__(self, s: str) -> str: ...
|
||||
@@ -408,7 +410,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
|
||||
class memoryview():
|
||||
# TODO arg can be any obj supporting the buffer protocol
|
||||
def __init__(self, bytearray) -> None: ...
|
||||
def __init__(self, b: bytearray) -> None: ...
|
||||
|
||||
class bool(int, SupportsInt, SupportsFloat):
|
||||
def __init__(self, o: object = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user