Use lowercase type everywhere (#6853)

This commit is contained in:
Alex Waygood
2022-01-08 15:09:29 +00:00
committed by GitHub
parent f8501d33c7
commit a40d79a4e6
172 changed files with 728 additions and 761 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, ClassVar, Type
from typing import Any, ClassVar
from .. import types as sqltypes
from ..util import memoized_property
@@ -13,7 +13,7 @@ NO_CACHE_KEY: Any
NO_DIALECT_SUPPORT: Any
class DefaultDialect(interfaces.Dialect):
execution_ctx_cls: ClassVar[Type[interfaces.ExecutionContext]]
execution_ctx_cls: ClassVar[type[interfaces.ExecutionContext]]
statement_compiler: Any
ddl_compiler: Any
type_compiler: Any

View File

@@ -1,5 +1,5 @@
from collections.abc import Callable
from typing import Any, Type as TypingType
from typing import Any
MypyFile = Any # from mypy.nodes
AttributeContext = Any # from mypy.plugin
@@ -17,4 +17,4 @@ class SQLAlchemyPlugin(Plugin):
def get_attribute_hook(self, fullname: str) -> Callable[[AttributeContext], Type] | None: ...
def get_additional_deps(self, file: MypyFile) -> list[tuple[int, str, int]]: ...
def plugin(version: str) -> TypingType[SQLAlchemyPlugin]: ...
def plugin(version: str) -> type[SQLAlchemyPlugin]: ...

View File

@@ -1,5 +1,5 @@
from collections.abc import Iterable, Iterator
from typing import Any, Type as TypingType, TypeVar, overload
from typing import Any, TypeVar, overload
CallExpr = Any # from mypy.nodes
Context = Any # from mypy.nodes
@@ -42,7 +42,7 @@ def add_global(ctx: ClassDefContext | DynamicClassDefContext, module: str, symbo
@overload
def get_callexpr_kwarg(callexpr: CallExpr, name: str, *, expr_types: None = ...) -> CallExpr | NameExpr | None: ...
@overload
def get_callexpr_kwarg(callexpr: CallExpr, name: str, *, expr_types: tuple[TypingType[_TArgType], ...]) -> _TArgType | None: ...
def get_callexpr_kwarg(callexpr: CallExpr, name: str, *, expr_types: tuple[type[_TArgType], ...]) -> _TArgType | None: ...
def flatten_typechecking(stmts: Iterable[Statement]) -> Iterator[Statement]: ...
def unbound_to_instance(api: SemanticAnalyzerPluginInterface, typ: Type) -> Type: ...
def info_for_cls(cls, api: SemanticAnalyzerPluginInterface) -> TypeInfo | None: ...