Add mypy error codes to '# type: ignore' comments (#6379)

This commit is contained in:
Akuli
2021-11-26 08:07:56 +02:00
committed by GitHub
parent 1278fa86e2
commit a5bc1e037f
74 changed files with 218 additions and 202 deletions

View File

@@ -11,4 +11,4 @@ class JSON(JSONCommands):
def __init__(self, client, version: Any | None = ..., decoder=..., encoder=...) -> None: ...
def pipeline(self, transaction: bool = ..., shard_hint: Any | None = ...) -> Pipeline: ...
class Pipeline(JSONCommands, ClientPipeline): ... # type: ignore
class Pipeline(JSONCommands, ClientPipeline): ... # type: ignore[misc]

View File

@@ -10,4 +10,4 @@ class TimeSeries(TimeSeriesCommands):
def __init__(self, client: Any | None = ..., **kwargs) -> None: ...
def pipeline(self, transaction: bool = ..., shard_hint: Any | None = ...) -> Pipeline: ...
class Pipeline(TimeSeriesCommands, ClientPipeline): ... # type: ignore
class Pipeline(TimeSeriesCommands, ClientPipeline): ... # type: ignore[misc]

View File

@@ -14,7 +14,7 @@ def from_url(url: str, *, db: int = ..., decode_responses: Literal[True], **kwar
def from_url(url: str, *, db: int = ..., decode_responses: Literal[False] = ..., **kwargs: Any) -> Redis[bytes]: ...
def pipeline(redis_obj: Redis[_StrType]) -> AbstractContextManager[Pipeline[_StrType]]: ...
@overload
def str_if_bytes(value: bytes) -> str: ... # type: ignore
def str_if_bytes(value: bytes) -> str: ... # type: ignore[misc]
@overload
def str_if_bytes(value: _T) -> _T: ...
def safe_str(value: object) -> str: ...