mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 10:51:15 +08:00
Always use TypeAlias when assigning to Any (#8021)
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from . import util
|
||||
|
||||
AssignmentStmt = Any # from mypy.nodes
|
||||
NameExpr = Any # from mypy.nodes
|
||||
StrExpr = Any # from mypy.nodes
|
||||
SemanticAnalyzerPluginInterface = Any # from mypy.plugin
|
||||
ProperType = Any # from mypy.types
|
||||
AssignmentStmt: TypeAlias = Any # from mypy.nodes
|
||||
NameExpr: TypeAlias = Any # from mypy.nodes
|
||||
StrExpr: TypeAlias = Any # from mypy.nodes
|
||||
SemanticAnalyzerPluginInterface: TypeAlias = Any # from mypy.plugin
|
||||
ProperType: TypeAlias = Any # from mypy.types
|
||||
|
||||
def apply_mypy_mapped_attr(
|
||||
cls, api: SemanticAnalyzerPluginInterface, item: NameExpr | StrExpr, attributes: list[util.SQLAlchemyAttribute]
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from . import util
|
||||
|
||||
SemanticAnalyzerPluginInterface = Any # from mypy.plugin
|
||||
SemanticAnalyzerPluginInterface: TypeAlias = Any # from mypy.plugin
|
||||
|
||||
def scan_declarative_assignments_and_apply_types(
|
||||
cls, api: SemanticAnalyzerPluginInterface, is_mixin_scan: bool = ...
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
from collections.abc import Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
AssignmentStmt = Any # from mypy.nodes
|
||||
Expression = Any # from mypy.nodes
|
||||
RefExpr = Any # from mypy.nodes
|
||||
TypeInfo = Any # from mypy.nodes
|
||||
Var = Any # from mypy.nodes
|
||||
StrExpr = Any # from mypy.nodes
|
||||
SemanticAnalyzerPluginInterface = Any # from mypy.plugin
|
||||
ProperType = Any # from mypy.types
|
||||
AssignmentStmt: TypeAlias = Any # from mypy.nodes
|
||||
Expression: TypeAlias = Any # from mypy.nodes
|
||||
RefExpr: TypeAlias = Any # from mypy.nodes
|
||||
TypeInfo: TypeAlias = Any # from mypy.nodes
|
||||
Var: TypeAlias = Any # from mypy.nodes
|
||||
StrExpr: TypeAlias = Any # from mypy.nodes
|
||||
SemanticAnalyzerPluginInterface: TypeAlias = Any # from mypy.plugin
|
||||
ProperType: TypeAlias = Any # from mypy.types
|
||||
|
||||
def infer_type_from_right_hand_nameexpr(
|
||||
api: SemanticAnalyzerPluginInterface,
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
MypyFile = Any # from mypy.nodes
|
||||
AttributeContext = Any # from mypy.plugin
|
||||
ClassDefContext = Any # from mypy.plugin
|
||||
DynamicClassDefContext = Any # from mypy.plugin
|
||||
Plugin = Any # from mypy.plugin
|
||||
Type = Any # from mypy.types
|
||||
MypyFile: TypeAlias = Any # from mypy.nodes
|
||||
AttributeContext: TypeAlias = Any # from mypy.plugin
|
||||
ClassDefContext: TypeAlias = Any # from mypy.plugin
|
||||
DynamicClassDefContext: TypeAlias = Any # from mypy.plugin
|
||||
Plugin: TypeAlias = Any # from mypy.plugin
|
||||
Type: TypeAlias = Any # from mypy.types
|
||||
|
||||
class SQLAlchemyPlugin(Plugin):
|
||||
def get_dynamic_class_hook(self, fullname: str) -> Callable[[DynamicClassDefContext], None] | None: ...
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import asyncio as asyncio
|
||||
from collections.abc import Callable, Coroutine
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from .langhelpers import memoized_property
|
||||
|
||||
_greenlet = Any # actually greenlet.greenlet
|
||||
_greenlet: TypeAlias = Any # actually greenlet.greenlet
|
||||
|
||||
def is_exit_exception(e): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user