mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 03:52:19 +08:00
Never explicitly inherit from object in Python 3-only stubs (#6777)
This commit is contained in:
@@ -3,7 +3,7 @@ from typing import Iterable
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
class DateTimeRange(object):
|
||||
class DateTimeRange:
|
||||
NOT_A_TIME_STR: str
|
||||
start_time_format: str
|
||||
end_time_format: str
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
from collections.abc import Generator, Iterable
|
||||
from typing import Any
|
||||
|
||||
class HTMLParser(object): # actually html5lib.HTMLParser
|
||||
class HTMLParser: # actually html5lib.HTMLParser
|
||||
def __getattr__(self, __name: str) -> Any: ... # incomplete
|
||||
|
||||
class Filter(object): # actually html5lib.filters.base.Filter
|
||||
class Filter: # actually html5lib.filters.base.Filter
|
||||
def __getattr__(self, __name: str) -> Any: ... # incomplete
|
||||
|
||||
class SanitizerFilter(object): # actually html5lib.filters.sanitizer.Filter
|
||||
class SanitizerFilter: # actually html5lib.filters.sanitizer.Filter
|
||||
def __getattr__(self, __name: str) -> Any: ... # incomplete
|
||||
|
||||
class HTMLSerializer(object): # actually html5lib.serializer.HTMLSerializer
|
||||
class HTMLSerializer: # actually html5lib.serializer.HTMLSerializer
|
||||
def __getattr__(self, __name: str) -> Any: ... # incomplete
|
||||
|
||||
class BleachHTMLParser(HTMLParser):
|
||||
|
||||
@@ -21,7 +21,7 @@ def build_email_re(tlds: Iterable[str] = ...) -> Pattern[str]: ...
|
||||
|
||||
EMAIL_RE: Pattern[str]
|
||||
|
||||
class Linker(object):
|
||||
class Linker:
|
||||
def __init__(
|
||||
self,
|
||||
callbacks: Iterable[_Callback] = ...,
|
||||
|
||||
@@ -15,7 +15,7 @@ INVISIBLE_REPLACEMENT_CHAR: str
|
||||
# A html5lib Filter class
|
||||
_Filter = Any
|
||||
|
||||
class Cleaner(object):
|
||||
class Cleaner:
|
||||
tags: Container[str]
|
||||
attributes: _Attributes
|
||||
styles: Container[str]
|
||||
|
||||
@@ -30,7 +30,7 @@ DEF: Pattern[str]
|
||||
|
||||
_dict = dict # conflicts with attribute name
|
||||
|
||||
class FunctionMaker(object):
|
||||
class FunctionMaker:
|
||||
args: list[Text]
|
||||
varargs: Text | None
|
||||
varkw: Text | None
|
||||
|
||||
@@ -6,17 +6,17 @@ from typing import Any, Type, TypeVar, Union, overload
|
||||
_T = TypeVar("_T")
|
||||
_Freezable = Union[str, datetime, date, timedelta]
|
||||
|
||||
class TickingDateTimeFactory(object):
|
||||
class TickingDateTimeFactory:
|
||||
def __init__(self, time_to_freeze: datetime, start: datetime) -> None: ...
|
||||
def __call__(self) -> datetime: ...
|
||||
|
||||
class FrozenDateTimeFactory(object):
|
||||
class FrozenDateTimeFactory:
|
||||
def __init__(self, time_to_freeze: datetime) -> None: ...
|
||||
def __call__(self) -> datetime: ...
|
||||
def tick(self, delta: float | Real | timedelta = ...) -> None: ...
|
||||
def move_to(self, target_datetime: _Freezable | None) -> None: ...
|
||||
|
||||
class StepTickTimeFactory(object):
|
||||
class StepTickTimeFactory:
|
||||
def __init__(self, time_to_freeze: datetime, step_width: float) -> None: ...
|
||||
def __call__(self) -> datetime: ...
|
||||
def tick(self, delta: timedelta | None = ...) -> None: ...
|
||||
|
||||
@@ -18,7 +18,7 @@ def version_info() -> tuple[int, str, int, str, int, str, int, str, tuple[str, .
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
class Curl(object):
|
||||
class Curl:
|
||||
def close(self) -> None: ...
|
||||
def setopt(self, option: int, value: Any) -> None: ...
|
||||
def setopt_string(self, option: int, value: str) -> None: ...
|
||||
@@ -34,7 +34,7 @@ class Curl(object):
|
||||
# TODO(MichalPokorny): wat?
|
||||
USERPWD: int
|
||||
|
||||
class CurlMulti(object):
|
||||
class CurlMulti:
|
||||
def close(self) -> None: ...
|
||||
def add_handle(self, obj: Curl) -> None: ...
|
||||
def remove_handle(self, obj: Curl) -> None: ...
|
||||
@@ -44,7 +44,7 @@ class CurlMulti(object):
|
||||
def info_read(self, max_objects: int = ...) -> tuple[int, list[Any], list[Any]]: ...
|
||||
def socket_action(self, sockfd: int, ev_bitmask: int) -> tuple[int, int]: ...
|
||||
|
||||
class CurlShare(object):
|
||||
class CurlShare:
|
||||
def close(self) -> None: ...
|
||||
def setopt(self, option: int, value: Any) -> Any: ...
|
||||
|
||||
|
||||
@@ -689,7 +689,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
|
||||
def cluster(self, cluster_arg: str, *args: Any) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def client(self) -> Any: ...
|
||||
|
||||
class Monitor(object):
|
||||
class Monitor:
|
||||
command_re: Pattern[str]
|
||||
monitor_re: Pattern[str]
|
||||
def __init__(self, connection_pool) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user