Import names from typing directly rather than importing module (#13761)

This commit is contained in:
Avasam
2025-04-12 19:10:09 +02:00
committed by GitHub
parent 7ffb7e0832
commit a045be8ed6
10 changed files with 43 additions and 34 deletions
+5 -6
View File
@@ -1,12 +1,11 @@
import logging
import typing as t
from collections.abc import Callable
from typing import Any, TypeVar
from typing_extensions import TypeAlias
import click
_AnyCallable: TypeAlias = t.Callable[..., t.Any]
_FC = t.TypeVar("_FC", bound=_AnyCallable | click.Command)
_AnyCallable: TypeAlias = Callable[..., Any]
_FC = TypeVar("_FC", bound=_AnyCallable | click.Command)
def simple_verbosity_option(
logger: logging.Logger | str | None = None, *names: str, **kwargs: t.Any
) -> t.Callable[[_FC], _FC]: ...
def simple_verbosity_option(logger: logging.Logger | str | None = None, *names: str, **kwargs: Any) -> Callable[[_FC], _FC]: ...