Never explicitly inherit from object in Python 3-only stubs (#6777)

This commit is contained in:
Alex Waygood
2022-01-02 06:24:48 +00:00
committed by GitHub
parent d43cd997a4
commit 505ea72641
35 changed files with 79 additions and 67 deletions

View File

@@ -117,7 +117,7 @@ def register_adapter(__type: Type[_T], __caster: Callable[[_T], int | float | st
def register_converter(__name: str, __converter: Callable[[bytes], Any]) -> None: ...
if sys.version_info < (3, 8):
class Cache(object):
class Cache:
def __init__(self, *args, **kwargs) -> None: ...
def display(self, *args, **kwargs) -> None: ...
def get(self, *args, **kwargs) -> None: ...
@@ -126,7 +126,7 @@ class _AggregateProtocol(Protocol):
def step(self, value: int) -> None: ...
def finalize(self) -> int: ...
class Connection(object):
class Connection:
DataError: Any
DatabaseError: Any
Error: Any
@@ -221,12 +221,12 @@ class OperationalError(DatabaseError): ...
OptimizedUnicode = str
class PrepareProtocol(object):
class PrepareProtocol:
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class ProgrammingError(DatabaseError): ...
class Row(object):
class Row:
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def keys(self): ...
def __eq__(self, other): ...
@@ -241,7 +241,7 @@ class Row(object):
def __ne__(self, other): ...
if sys.version_info < (3, 8):
class Statement(object):
class Statement:
def __init__(self, *args, **kwargs): ...
class Warning(Exception): ...