Enable Ruff flake8-todos (TD) (#13748)

This commit is contained in:
Avasam
2025-04-03 07:43:54 +02:00
committed by GitHub
parent bd0f64a3cc
commit 4b253d2932
14 changed files with 20 additions and 14 deletions
@@ -10,7 +10,7 @@ class _GeoCoder(Protocol):
def geocode(self, query: str, /): ...
def reverse(self, coords, /, exactly_one: bool = ...): ...
# TODO Use something like `provider: Callable[P, _GeoCoder], **kwargs: P.kwargs` in the functions
# TODO: Use something like `provider: Callable[P, _GeoCoder], **kwargs: P.kwargs` in the functions
# below if this ever becomes a thing
def geocode(strings: Iterable[str], provider: str | Callable[..., _GeoCoder] | None = None, **kwargs) -> GeoDataFrame: ...
def reverse_geocode(
+1 -1
View File
@@ -24,7 +24,7 @@ OptGeoT = TypeVar("OptGeoT", bound=Geometry | None) # noqa: Y001
class SupportsArray(Protocol[_DType_co]):
def __array__(self) -> np.ndarray[Any, _DType_co]: ...
# TODO revisit when mypy is happy with generic recursive type alias
# TODO: revisit when mypy is happy with generic recursive type alias
# NestedSequence: TypeAlias = Sequence[_T] | Sequence[NestedSequence[_T]]
NestedSequence: TypeAlias = Sequence[_T] | Sequence[Sequence[_T]] | Sequence[Sequence[Sequence[_T]]]
DualArrayLike: TypeAlias = SupportsArray[_DType] | NestedSequence[SupportsArray[_DType]] | NestedSequence[_T]
+1 -1
View File
@@ -147,7 +147,7 @@ class VariableAggregation(Enum):
class _VariableMetaclass(type): ...
# Variable class in intent/documentation is a Tensor. In implementation there's
# TODO comment to make it Tensor. It is not actually Tensor type wise, but even
# TODO: comment to make it Tensor. It is not actually Tensor type wise, but even
# dynamically patches on most methods of tf.Tensor
# https://github.com/tensorflow/tensorflow/blob/9524a636cae9ae3f0554203c1ba7ee29c85fcf12/tensorflow/python/ops/variables.py#L1086.
class Variable(Tensor, metaclass=_VariableMetaclass):
+1 -1
View File
@@ -12,7 +12,7 @@ def logging_redirect_tqdm(
loggers: Sequence[logging.Logger] | None = None, tqdm_class: type[std_tqdm[Any]] = ...
) -> _GeneratorContextManager[None]: ...
# TODO type *args, **kwargs here more precisely
# TODO: type *args, **kwargs here more precisely
@overload
def tqdm_logging_redirect(*args, tqdm_class: Callable[..., _TqdmT], **kwargs) -> _GeneratorContextManager[_TqdmT]: ...
@overload