mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-21 09:08:27 +08:00
black: enable skip_magic_trailing_comma (#5252)
* black: enable skip_magic_trailing_comma * Remove spurious commas
This commit is contained in:
@@ -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