mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 16:57:12 +08:00
Added object.__sizeof__ (#865)
* Added object.__sizeof__ * Removed __sizeof__ inherited from object * Made sqlite3 classes for Python 2 inherit from object * Removed __sizeof__ inherited from object
This commit is contained in:
committed by
Łukasz Langa
parent
025f31dcc9
commit
c8435f4315
@@ -43,6 +43,7 @@ class object:
|
||||
def __format__(self, format_spec: str) -> str: ...
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
def __sizeof__(self) -> int: ...
|
||||
|
||||
class type(object):
|
||||
__bases__ = ... # type: Tuple[type, ...]
|
||||
|
||||
@@ -79,12 +79,12 @@ def register_adapter(type: type, callable: Any) -> None: ...
|
||||
# TODO: sqlite3.register_converter.__doc__ specifies callable as unknown
|
||||
def register_converter(typename: str, callable: bytes) -> None: ...
|
||||
|
||||
class Cache:
|
||||
class Cache(object):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def display(self, *args, **kwargs) -> None: ...
|
||||
def get(self, *args, **kwargs) -> None: ...
|
||||
|
||||
class Connection:
|
||||
class Connection(object):
|
||||
DataError = ... # type: Any
|
||||
DatabaseError = ... # type: Any
|
||||
Error = ... # type: Any
|
||||
@@ -165,7 +165,7 @@ class NotSupportedError(DatabaseError): ...
|
||||
|
||||
class OperationalError(DatabaseError): ...
|
||||
|
||||
class OptimizedUnicode:
|
||||
class OptimizedUnicode(object):
|
||||
maketrans = ... # type: Any
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def capitalize(self, *args, **kwargs): ...
|
||||
@@ -229,14 +229,13 @@ class OptimizedUnicode:
|
||||
def __ne__(self, other): ...
|
||||
def __rmod__(self, other): ...
|
||||
def __rmul__(self, other): ...
|
||||
def __sizeof__(self): ...
|
||||
|
||||
class PrepareProtocol:
|
||||
class PrepareProtocol(object):
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
|
||||
class ProgrammingError(DatabaseError): ...
|
||||
|
||||
class Row:
|
||||
class Row(object):
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def keys(self, *args, **kwargs): ...
|
||||
def __eq__(self, other): ...
|
||||
@@ -250,7 +249,7 @@ class Row:
|
||||
def __lt__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
|
||||
class Statement:
|
||||
class Statement(object):
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
|
||||
class Warning(Exception): ...
|
||||
|
||||
@@ -46,6 +46,7 @@ class object:
|
||||
def __format__(self, format_spec: str) -> str: ...
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
def __sizeof__(self) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init_subclass__(cls) -> None: ...
|
||||
|
||||
@@ -224,7 +224,6 @@ class Decimal(SupportsInt, SupportsFloat, SupportsAbs[Decimal], SupportsRound[in
|
||||
def __rpow__(self, other: int) -> Decimal: ...
|
||||
def __rsub__(self, other: int) -> Decimal: ...
|
||||
def __rtruediv__(self, other: int) -> Decimal: ...
|
||||
def __sizeof__(self) -> int: ...
|
||||
def __sub__(self, other: _Decimal) -> Decimal: ...
|
||||
def __truediv__(self, other: _Decimal) -> Decimal: ...
|
||||
def __trunc__(self) -> int: ...
|
||||
|
||||
@@ -229,7 +229,6 @@ class OptimizedUnicode:
|
||||
def __ne__(self, other): ...
|
||||
def __rmod__(self, other): ...
|
||||
def __rmul__(self, other): ...
|
||||
def __sizeof__(self): ...
|
||||
|
||||
class PrepareProtocol:
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
|
||||
Reference in New Issue
Block a user