mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-30 06:35:22 +08:00
black: enable skip_magic_trailing_comma (#5252)
* black: enable skip_magic_trailing_comma * Remove spurious commas
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
line_length = 130
|
||||
target_version = ["py37"]
|
||||
exclude = ".*_pb2.pyi"
|
||||
skip_magic_trailing_comma = true
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# typeshed is released on PyPI.
|
||||
git+https://github.com/python/mypy.git@master
|
||||
typed-ast>=1.0.4
|
||||
black==21.4b0
|
||||
black==21.4b1
|
||||
flake8==3.8.4
|
||||
flake8-bugbear==20.1.4
|
||||
flake8-pyi==20.10.0
|
||||
|
||||
@@ -1007,11 +1007,7 @@ def round(number: SupportsFloat) -> float: ...
|
||||
def round(number: SupportsFloat, ndigits: int) -> float: ...
|
||||
def setattr(__obj: Any, __name: Text, __value: Any) -> None: ...
|
||||
def sorted(
|
||||
__iterable: Iterable[_T],
|
||||
*,
|
||||
cmp: Callable[[_T, _T], int] = ...,
|
||||
key: Optional[Callable[[_T], Any]] = ...,
|
||||
reverse: bool = ...,
|
||||
__iterable: Iterable[_T], *, cmp: Callable[[_T, _T], int] = ..., key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...
|
||||
) -> List[_T]: ...
|
||||
@overload
|
||||
def sum(__iterable: Iterable[_T]) -> Union[_T, int]: ...
|
||||
|
||||
@@ -1007,11 +1007,7 @@ def round(number: SupportsFloat) -> float: ...
|
||||
def round(number: SupportsFloat, ndigits: int) -> float: ...
|
||||
def setattr(__obj: Any, __name: Text, __value: Any) -> None: ...
|
||||
def sorted(
|
||||
__iterable: Iterable[_T],
|
||||
*,
|
||||
cmp: Callable[[_T, _T], int] = ...,
|
||||
key: Optional[Callable[[_T], Any]] = ...,
|
||||
reverse: bool = ...,
|
||||
__iterable: Iterable[_T], *, cmp: Callable[[_T, _T], int] = ..., key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...
|
||||
) -> List[_T]: ...
|
||||
@overload
|
||||
def sum(__iterable: Iterable[_T]) -> Union[_T, int]: ...
|
||||
|
||||
@@ -73,24 +73,13 @@ class Logger(Filterer):
|
||||
) -> None: ...
|
||||
fatal = critical
|
||||
def log(
|
||||
self,
|
||||
level: int,
|
||||
msg: Any,
|
||||
*args: Any,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
extra: Optional[Dict[str, Any]] = ...,
|
||||
**kwargs: Any,
|
||||
self, level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
def exception(
|
||||
self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
def _log(
|
||||
self,
|
||||
level: int,
|
||||
msg: Any,
|
||||
args: _ArgsType,
|
||||
exc_info: Optional[_ExcInfoType] = ...,
|
||||
extra: Optional[Dict[str, Any]] = ...,
|
||||
self, level: int, msg: Any, args: _ArgsType, exc_info: Optional[_ExcInfoType] = ..., extra: Optional[Dict[str, Any]] = ...
|
||||
) -> None: ... # undocumented
|
||||
def filter(self, record: LogRecord) -> bool: ...
|
||||
def addHandler(self, hdlr: Handler) -> None: ...
|
||||
@@ -210,13 +199,7 @@ class LoggerAdapter:
|
||||
self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
def log(
|
||||
self,
|
||||
level: int,
|
||||
msg: Any,
|
||||
*args: Any,
|
||||
exc_info: _ExcInfoType = ...,
|
||||
extra: Optional[Dict[str, Any]] = ...,
|
||||
**kwargs: Any,
|
||||
self, level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
def isEnabledFor(self, level: int) -> bool: ...
|
||||
|
||||
|
||||
@@ -104,17 +104,7 @@ OpenTextModeUpdating = Literal[
|
||||
"t+x",
|
||||
"+tx",
|
||||
]
|
||||
OpenTextModeWriting = Literal[
|
||||
"w",
|
||||
"wt",
|
||||
"tw",
|
||||
"a",
|
||||
"at",
|
||||
"ta",
|
||||
"x",
|
||||
"xt",
|
||||
"tx",
|
||||
]
|
||||
OpenTextModeWriting = Literal["w", "wt", "tw", "a", "at", "ta", "x", "xt", "tx"]
|
||||
OpenTextModeReading = Literal["r", "rt", "tr", "U", "rU", "Ur", "rtU", "rUt", "Urt", "trU", "tUr", "Utr"]
|
||||
OpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading]
|
||||
OpenBinaryModeUpdating = Literal[
|
||||
|
||||
@@ -33,11 +33,7 @@ class Server(AbstractServer):
|
||||
ssl_handshake_timeout: Optional[float],
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
loop: AbstractEventLoop,
|
||||
sockets: List[socket],
|
||||
) -> None: ...
|
||||
def __init__(self, loop: AbstractEventLoop, sockets: List[socket]) -> None: ...
|
||||
|
||||
class BaseEventLoop(AbstractEventLoop, metaclass=ABCMeta):
|
||||
def run_forever(self) -> None: ...
|
||||
|
||||
@@ -334,10 +334,7 @@ class str(Sequence[str]):
|
||||
def count(self, x: str, __start: Optional[SupportsIndex] = ..., __end: Optional[SupportsIndex] = ...) -> int: ...
|
||||
def encode(self, encoding: str = ..., errors: str = ...) -> bytes: ...
|
||||
def endswith(
|
||||
self,
|
||||
__suffix: Union[str, Tuple[str, ...]],
|
||||
__start: Optional[SupportsIndex] = ...,
|
||||
__end: Optional[SupportsIndex] = ...,
|
||||
self, __suffix: Union[str, Tuple[str, ...]], __start: Optional[SupportsIndex] = ..., __end: Optional[SupportsIndex] = ...
|
||||
) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> str: ...
|
||||
def find(self, __sub: str, __start: Optional[SupportsIndex] = ..., __end: Optional[SupportsIndex] = ...) -> int: ...
|
||||
@@ -375,10 +372,7 @@ class str(Sequence[str]):
|
||||
def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[str]: ...
|
||||
def startswith(
|
||||
self,
|
||||
__prefix: Union[str, Tuple[str, ...]],
|
||||
__start: Optional[SupportsIndex] = ...,
|
||||
__end: Optional[SupportsIndex] = ...,
|
||||
self, __prefix: Union[str, Tuple[str, ...]], __start: Optional[SupportsIndex] = ..., __end: Optional[SupportsIndex] = ...
|
||||
) -> bool: ...
|
||||
def strip(self, __chars: Optional[str] = ...) -> str: ...
|
||||
def swapcase(self) -> str: ...
|
||||
@@ -999,9 +993,7 @@ def eval(
|
||||
__source: Union[str, bytes, CodeType], __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Mapping[str, Any]] = ...
|
||||
) -> Any: ...
|
||||
def exec(
|
||||
__source: Union[str, bytes, CodeType],
|
||||
__globals: Optional[Dict[str, Any]] = ...,
|
||||
__locals: Optional[Mapping[str, Any]] = ...,
|
||||
__source: Union[str, bytes, CodeType], __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Mapping[str, Any]] = ...
|
||||
) -> Any: ...
|
||||
def exit(code: object = ...) -> NoReturn: ...
|
||||
|
||||
|
||||
@@ -16,11 +16,7 @@ class FileList:
|
||||
def process_template_line(self, line: str) -> None: ...
|
||||
@overload
|
||||
def include_pattern(
|
||||
self,
|
||||
pattern: str,
|
||||
anchor: Union[int, bool] = ...,
|
||||
prefix: Optional[str] = ...,
|
||||
is_regex: Literal[0, False] = ...,
|
||||
self, pattern: str, anchor: Union[int, bool] = ..., prefix: Optional[str] = ..., is_regex: Literal[0, False] = ...
|
||||
) -> bool: ...
|
||||
@overload
|
||||
def include_pattern(self, pattern: Union[str, Pattern[str]], *, is_regex: Literal[True, 1] = ...) -> bool: ...
|
||||
@@ -34,11 +30,7 @@ class FileList:
|
||||
) -> bool: ...
|
||||
@overload
|
||||
def exclude_pattern(
|
||||
self,
|
||||
pattern: str,
|
||||
anchor: Union[int, bool] = ...,
|
||||
prefix: Optional[str] = ...,
|
||||
is_regex: Literal[0, False] = ...,
|
||||
self, pattern: str, anchor: Union[int, bool] = ..., prefix: Optional[str] = ..., is_regex: Literal[0, False] = ...
|
||||
) -> bool: ...
|
||||
@overload
|
||||
def exclude_pattern(self, pattern: Union[str, Pattern[str]], *, is_regex: Literal[True, 1] = ...) -> bool: ...
|
||||
|
||||
@@ -157,9 +157,5 @@ def parse227(resp: str) -> Tuple[str, int]: ... # undocumented
|
||||
def parse229(resp: str, peer: Any) -> Tuple[str, int]: ... # undocumented
|
||||
def parse257(resp: str) -> str: ... # undocumented
|
||||
def ftpcp(
|
||||
source: FTP,
|
||||
sourcename: str,
|
||||
target: FTP,
|
||||
targetname: str = ...,
|
||||
type: Literal["A", "I"] = ...,
|
||||
source: FTP, sourcename: str, target: FTP, targetname: str = ..., type: Literal["A", "I"] = ...
|
||||
) -> None: ... # undocumented
|
||||
|
||||
@@ -16,11 +16,7 @@ def source_from_cache(path: str) -> str: ...
|
||||
def decode_source(source_bytes: bytes) -> str: ...
|
||||
def find_spec(name: str, package: Optional[str] = ...) -> Optional[importlib.machinery.ModuleSpec]: ...
|
||||
def spec_from_loader(
|
||||
name: str,
|
||||
loader: Optional[importlib.abc.Loader],
|
||||
*,
|
||||
origin: Optional[str] = ...,
|
||||
is_package: Optional[bool] = ...,
|
||||
name: str, loader: Optional[importlib.abc.Loader], *, origin: Optional[str] = ..., is_package: Optional[bool] = ...
|
||||
) -> Optional[importlib.machinery.ModuleSpec]: ...
|
||||
def spec_from_file_location(
|
||||
name: str,
|
||||
|
||||
@@ -12,9 +12,7 @@ else:
|
||||
|
||||
def dictConfig(config: dict[str, Any]) -> None: ...
|
||||
def fileConfig(
|
||||
fname: Union[_Path, IO[str], RawConfigParser],
|
||||
defaults: Optional[dict[str, str]] = ...,
|
||||
disable_existing_loggers: bool = ...,
|
||||
fname: Union[_Path, IO[str], RawConfigParser], defaults: Optional[dict[str, str]] = ..., disable_existing_loggers: bool = ...
|
||||
) -> None: ...
|
||||
def listen(port: int = ..., verify: Optional[Callable[[bytes], Optional[bytes]]] = ...) -> Thread: ...
|
||||
def stopListening() -> None: ...
|
||||
|
||||
@@ -87,18 +87,10 @@ class DebuggingServer(SMTPServer): ...
|
||||
|
||||
class PureProxy(SMTPServer):
|
||||
def process_message( # type: ignore
|
||||
self,
|
||||
peer: _Address,
|
||||
mailfrom: str,
|
||||
rcpttos: List[Text],
|
||||
data: Union[bytes, str],
|
||||
self, peer: _Address, mailfrom: str, rcpttos: List[Text], data: Union[bytes, str]
|
||||
) -> Optional[str]: ...
|
||||
|
||||
class MailmanProxy(PureProxy):
|
||||
def process_message( # type: ignore
|
||||
self,
|
||||
peer: _Address,
|
||||
mailfrom: str,
|
||||
rcpttos: List[Text],
|
||||
data: Union[bytes, str],
|
||||
self, peer: _Address, mailfrom: str, rcpttos: List[Text], data: Union[bytes, str]
|
||||
) -> Optional[str]: ...
|
||||
|
||||
@@ -348,10 +348,7 @@ class Misc:
|
||||
# binds do. The default value of func is not str.
|
||||
@overload
|
||||
def bind(
|
||||
self,
|
||||
sequence: Optional[str] = ...,
|
||||
func: Optional[Callable[[Event[Misc]], Any]] = ...,
|
||||
add: Optional[bool] = ...,
|
||||
self, sequence: Optional[str] = ..., func: Optional[Callable[[Event[Misc]], Any]] = ..., add: Optional[bool] = ...
|
||||
) -> str: ...
|
||||
@overload
|
||||
def bind(self, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...
|
||||
@@ -361,10 +358,7 @@ class Misc:
|
||||
# callbacks will get, so those are Misc.
|
||||
@overload
|
||||
def bind_all(
|
||||
self,
|
||||
sequence: Optional[str] = ...,
|
||||
func: Optional[Callable[[Event[Misc]], Any]] = ...,
|
||||
add: Optional[bool] = ...,
|
||||
self, sequence: Optional[str] = ..., func: Optional[Callable[[Event[Misc]], Any]] = ..., add: Optional[bool] = ...
|
||||
) -> str: ...
|
||||
@overload
|
||||
def bind_all(self, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...
|
||||
@@ -840,10 +834,7 @@ class Widget(BaseWidget, Pack, Place, Grid):
|
||||
# widgets don't.
|
||||
@overload
|
||||
def bind(
|
||||
self: _W,
|
||||
sequence: Optional[str] = ...,
|
||||
func: Optional[Callable[[Event[_W]], Any]] = ...,
|
||||
add: Optional[bool] = ...,
|
||||
self: _W, sequence: Optional[str] = ..., func: Optional[Callable[[Event[_W]], Any]] = ..., add: Optional[bool] = ...
|
||||
) -> str: ...
|
||||
@overload
|
||||
def bind(self, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...
|
||||
@@ -2682,11 +2673,7 @@ class Text(Widget, XView, YView):
|
||||
# tag_bind stuff is very similar to Canvas
|
||||
@overload
|
||||
def tag_bind(
|
||||
self,
|
||||
tagName: str,
|
||||
sequence: Optional[str],
|
||||
func: Optional[Callable[[Event[Text]], Any]],
|
||||
add: Optional[bool] = ...,
|
||||
self, tagName: str, sequence: Optional[str], func: Optional[Callable[[Event[Text]], Any]], add: Optional[bool] = ...
|
||||
) -> str: ...
|
||||
@overload
|
||||
def tag_bind(self, tagName: str, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...
|
||||
|
||||
@@ -950,10 +950,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
||||
# Also, it's 'callback' instead of 'func' here.
|
||||
@overload
|
||||
def tag_bind(
|
||||
self,
|
||||
tagname: str,
|
||||
sequence: Optional[str] = ...,
|
||||
callback: Optional[Callable[[tkinter.Event[Treeview]], Any]] = ...,
|
||||
self, tagname: str, sequence: Optional[str] = ..., callback: Optional[Callable[[tkinter.Event[Treeview]], Any]] = ...
|
||||
) -> str: ...
|
||||
@overload
|
||||
def tag_bind(self, tagname: str, sequence: Optional[str], callback: str) -> None: ...
|
||||
|
||||
@@ -603,12 +603,7 @@ if sys.version_info >= (3, 7):
|
||||
]
|
||||
else:
|
||||
_get_type_hints_obj_allowed_types = Union[
|
||||
object,
|
||||
Callable[..., Any],
|
||||
FunctionType,
|
||||
BuiltinFunctionType,
|
||||
MethodType,
|
||||
ModuleType,
|
||||
object, Callable[..., Any], FunctionType, BuiltinFunctionType, MethodType, ModuleType,
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -621,9 +616,7 @@ if sys.version_info >= (3, 9):
|
||||
|
||||
else:
|
||||
def get_type_hints(
|
||||
obj: _get_type_hints_obj_allowed_types,
|
||||
globalns: Optional[Dict[str, Any]] = ...,
|
||||
localns: Optional[Dict[str, Any]] = ...,
|
||||
obj: _get_type_hints_obj_allowed_types, globalns: Optional[Dict[str, Any]] = ..., localns: Optional[Dict[str, Any]] = ...
|
||||
) -> Dict[str, Any]: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
|
||||
@@ -137,13 +137,7 @@ class Client:
|
||||
can_monitor: bool = ...,
|
||||
is_terminal: bool = ...,
|
||||
) -> List[Port]: ...
|
||||
def set_property(
|
||||
self,
|
||||
subject: Union[int, str],
|
||||
key: str,
|
||||
value: Union[str, bytes],
|
||||
type: str = ...,
|
||||
) -> None: ...
|
||||
def set_property(self, subject: Union[int, str], key: str, value: Union[str, bytes], type: str = ...) -> None: ...
|
||||
def remove_property(self, subject: Union[int, str], key: str) -> None: ...
|
||||
def remove_properties(self, subject: Union[int, str]) -> int: ...
|
||||
def remove_all_properties(self) -> None: ...
|
||||
@@ -202,9 +196,7 @@ class OwnMidiPort(MidiPort, OwnPort):
|
||||
def max_event_size(self) -> int: ...
|
||||
@property
|
||||
def lost_midi_events(self) -> int: ...
|
||||
def incoming_midi_events(
|
||||
self,
|
||||
) -> Generator[Tuple[int, _CBufferType], None, None]: ...
|
||||
def incoming_midi_events(self) -> Generator[Tuple[int, _CBufferType], None, None]: ...
|
||||
def clear_buffer(self) -> None: ...
|
||||
def write_midi_event(self, time: int, event: Union[bytes, Sequence[int], _CBufferType]) -> None: ...
|
||||
def reserve_midi_event(self, time: int, size: int) -> _CBufferType: ...
|
||||
|
||||
@@ -18,22 +18,13 @@ class Spinner(object):
|
||||
stream: _Stream
|
||||
stop_running: Optional[threading.Event]
|
||||
spin_thread: Optional[threading.Thread]
|
||||
def __init__(
|
||||
self,
|
||||
beep: bool,
|
||||
disable: bool,
|
||||
force: bool,
|
||||
stream: _Stream,
|
||||
) -> None: ...
|
||||
def __init__(self, beep: bool, disable: bool, force: bool, stream: _Stream) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def init_spin(self) -> None: ...
|
||||
def __enter__(self) -> Spinner: ...
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: Optional[Type[BaseException]],
|
||||
exc_val: Optional[BaseException],
|
||||
exc_tb: Optional[TracebackType],
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
|
||||
) -> Literal[False]: ...
|
||||
|
||||
def spinner(beep: bool, disable: bool, force: bool, stream: _Stream) -> Spinner: ...
|
||||
|
||||
@@ -17,12 +17,7 @@ class HelpFormatter:
|
||||
def write(self, string: str) -> None: ...
|
||||
def indent(self) -> None: ...
|
||||
def dedent(self) -> None: ...
|
||||
def write_usage(
|
||||
self,
|
||||
prog: str,
|
||||
args: str = ...,
|
||||
prefix: str = ...,
|
||||
) -> None: ...
|
||||
def write_usage(self, prog: str, args: str = ..., prefix: str = ...) -> None: ...
|
||||
def write_heading(self, heading: str) -> None: ...
|
||||
def write_paragraph(self) -> None: ...
|
||||
def write_text(self, text: str) -> None: ...
|
||||
|
||||
@@ -5,9 +5,5 @@ __version__: str
|
||||
_Argv = Union[Iterable[str], str]
|
||||
|
||||
def docopt(
|
||||
doc: str,
|
||||
argv: Optional[_Argv] = ...,
|
||||
help: bool = ...,
|
||||
version: Optional[Any] = ...,
|
||||
options_first: bool = ...,
|
||||
doc: str, argv: Optional[_Argv] = ..., help: bool = ..., version: Optional[Any] = ..., options_first: bool = ...
|
||||
) -> dict[str, Any]: ... # Really should be dict[str, Union[str, bool]]
|
||||
|
||||
@@ -244,59 +244,23 @@ class EnumDescriptor(_NestedDescriptorBase):
|
||||
def GetOptions(self) -> EnumOptions: ...
|
||||
|
||||
class EnumValueDescriptor(DescriptorBase):
|
||||
def __new__(
|
||||
cls,
|
||||
name,
|
||||
index,
|
||||
number,
|
||||
type=...,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
create_key=...,
|
||||
): ...
|
||||
def __new__(cls, name, index, number, type=..., options=..., serialized_options=..., create_key=...): ...
|
||||
name: Any
|
||||
index: Any
|
||||
number: Any
|
||||
type: Any
|
||||
def __init__(
|
||||
self,
|
||||
name,
|
||||
index,
|
||||
number,
|
||||
type=...,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
create_key=...,
|
||||
) -> None: ...
|
||||
def __init__(self, name, index, number, type=..., options=..., serialized_options=..., create_key=...) -> None: ...
|
||||
def GetOptions(self) -> EnumValueOptions: ...
|
||||
|
||||
class OneofDescriptor:
|
||||
def __new__(
|
||||
cls,
|
||||
name,
|
||||
full_name,
|
||||
index,
|
||||
containing_type,
|
||||
fields,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
create_key=...,
|
||||
): ...
|
||||
def __new__(cls, name, full_name, index, containing_type, fields, options=..., serialized_options=..., create_key=...): ...
|
||||
name: Any
|
||||
full_name: Any
|
||||
index: Any
|
||||
containing_type: Any
|
||||
fields: Any
|
||||
def __init__(
|
||||
self,
|
||||
name,
|
||||
full_name,
|
||||
index,
|
||||
containing_type,
|
||||
fields,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
create_key=...,
|
||||
self, name, full_name, index, containing_type, fields, options=..., serialized_options=..., create_key=...
|
||||
) -> None: ...
|
||||
def GetOptions(self) -> OneofOptions: ...
|
||||
|
||||
|
||||
@@ -34,8 +34,5 @@ def Parse(
|
||||
descriptor_pool: Optional[DescriptorPool] = ...,
|
||||
) -> _MessageT: ...
|
||||
def ParseDict(
|
||||
js_dict: Any,
|
||||
message: _MessageT,
|
||||
ignore_unknown_fields: bool = ...,
|
||||
descriptor_pool: Optional[DescriptorPool] = ...,
|
||||
js_dict: Any, message: _MessageT, ignore_unknown_fields: bool = ..., descriptor_pool: Optional[DescriptorPool] = ...
|
||||
) -> _MessageT: ...
|
||||
|
||||
@@ -604,17 +604,7 @@ class Redis(Generic[_StrType]):
|
||||
def xack(self, name, groupname, *ids): ...
|
||||
def xadd(self, name, fields, id=..., maxlen=..., approximate=...): ...
|
||||
def xclaim(
|
||||
self,
|
||||
name,
|
||||
groupname,
|
||||
consumername,
|
||||
min_idle_time,
|
||||
message_ids,
|
||||
idle=...,
|
||||
time=...,
|
||||
retrycount=...,
|
||||
force=...,
|
||||
justid=...,
|
||||
self, name, groupname, consumername, min_idle_time, message_ids, idle=..., time=..., retrycount=..., force=..., justid=...
|
||||
): ...
|
||||
def xdel(self, name, *ids): ...
|
||||
def xgroup_create(self, name, groupname, id=..., mkstream=...): ...
|
||||
@@ -1029,17 +1019,7 @@ class Pipeline(Redis):
|
||||
def xack(self, name, groupname, *ids) -> Pipeline: ... # type: ignore [override]
|
||||
def xadd(self, name, fields, id=..., maxlen=..., approximate=...) -> Pipeline: ... # type: ignore [override]
|
||||
def xclaim(
|
||||
self,
|
||||
name,
|
||||
groupname,
|
||||
consumername,
|
||||
min_idle_time,
|
||||
message_ids,
|
||||
idle=...,
|
||||
time=...,
|
||||
retrycount=...,
|
||||
force=...,
|
||||
justid=...,
|
||||
self, name, groupname, consumername, min_idle_time, message_ids, idle=..., time=..., retrycount=..., force=..., justid=...
|
||||
) -> Pipeline: ... # type: ignore [override]
|
||||
def xdel(self, name, *ids) -> Pipeline: ... # type: ignore [override]
|
||||
def xgroup_create(self, name, groupname, id=..., mkstream=...) -> Pipeline: ... # type: ignore [override]
|
||||
|
||||
@@ -19,16 +19,10 @@ class Lock:
|
||||
def register_scripts(self) -> None: ...
|
||||
def __enter__(self) -> Lock: ...
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: Optional[Type[BaseException]],
|
||||
exc_value: Optional[BaseException],
|
||||
traceback: Optional[TracebackType],
|
||||
self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], traceback: Optional[TracebackType]
|
||||
) -> Optional[bool]: ...
|
||||
def acquire(
|
||||
self,
|
||||
blocking: Optional[bool] = ...,
|
||||
blocking_timeout: Union[None, int, float] = ...,
|
||||
token: Optional[_TokenValue] = ...,
|
||||
self, blocking: Optional[bool] = ..., blocking_timeout: Union[None, int, float] = ..., token: Optional[_TokenValue] = ...
|
||||
) -> bool: ...
|
||||
def do_acquire(self, token: _TokenValue) -> bool: ...
|
||||
def locked(self) -> bool: ...
|
||||
|
||||
@@ -4,15 +4,9 @@ from typing import Any, Optional, Tuple
|
||||
PY2: bool
|
||||
PY3: bool
|
||||
WIN: bool
|
||||
string_types: Tuple[
|
||||
str,
|
||||
]
|
||||
integer_types: Tuple[
|
||||
int,
|
||||
]
|
||||
class_types: Tuple[
|
||||
type,
|
||||
]
|
||||
string_types: Tuple[str]
|
||||
integer_types: Tuple[int]
|
||||
class_types: Tuple[type]
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
long = int
|
||||
|
||||
Reference in New Issue
Block a user