Check for unused pyright: ignore and differentiate from mypy ignores (#9397)

This commit is contained in:
Avasam
2022-12-28 05:44:29 -05:00
committed by GitHub
parent 07f587dc70
commit 23ac9bff19
17 changed files with 44 additions and 21 deletions
-2
View File
@@ -23,7 +23,6 @@ _StrType = TypeVar("_StrType", bound=str | bytes)
_VT = TypeVar("_VT")
_T = TypeVar("_T")
_ScoreCastFuncReturn = TypeVar("_ScoreCastFuncReturn")
# Keyword arguments that are passed to Redis.parse_response().
_ParseResponseOptions: TypeAlias = Any
@@ -568,7 +567,6 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
def sscan_iter(self, name: _Key, match: _Key | None = ..., count: int | None = ...) -> Iterator[Any]: ...
def hscan(self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override]
def hscan_iter(self, name, match: _Key | None = ..., count: int | None = ...) -> Iterator[Any]: ...
def zscan(self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ..., score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...) -> Pipeline[_StrType]: ... # type: ignore[override]
def zscan_iter(
self, name: _Key, match: _Key | None = ..., count: int | None = ..., score_cast_func: Callable[[_StrType], Any] = ...
) -> Iterator[Any]: ...
+2 -1
View File
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from typing import Any
from ...client import Pipeline as ClientPipeline
@@ -11,4 +12,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[misc]
class Pipeline(JSONCommands, ClientPipeline[Incomplete]): ... # type: ignore[misc]
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from typing import Any
from ...client import Pipeline as ClientPipeline
@@ -10,4 +11,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[misc]
class Pipeline(TimeSeriesCommands, ClientPipeline[Incomplete]): ... # type: ignore[misc]