Skip to content

Commit 6e7a6b4

Browse files
authored
Update returns_plugin.py
1 parent 1b21488 commit 6e7a6b4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

returns/contrib/mypy/returns_plugin.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"""
1313

1414
from collections.abc import Callable, Mapping
15-
from typing import ClassVar, final
15+
from typing import ClassVar, TypeAlias, final
1616

1717
from mypy.nodes import SymbolTableNode
1818
from mypy.plugin import (
@@ -39,22 +39,22 @@
3939
# ============
4040

4141
#: Type for a function hook.
42-
_FunctionCallback = Callable[[FunctionContext], MypyType]
42+
_FunctionCallback: TypeAlias = Callable[[FunctionContext], MypyType]
4343

4444
#: Type for a function hook that need a definition node.
45-
_FunctionDefCallback = Callable[
45+
_FunctionDefCallback: TypeAlias = Callable[
4646
[SymbolTableNode | None],
4747
Callable[[FunctionContext], MypyType],
4848
]
4949

5050
#: Type for attribute hook.
51-
_AttributeCallback = Callable[[AttributeContext], MypyType]
51+
_AttributeCallback: TypeAlias = Callable[[AttributeContext], MypyType]
5252

5353
#: Type for a method hook.
54-
_MethodCallback = Callable[[MethodContext], MypyType]
54+
_MethodCallback: TypeAlias = Callable[[MethodContext], MypyType]
5555

5656
#: Type for a method signature hook.
57-
_MethodSigCallback = Callable[[MethodSigContext], CallableType]
57+
_MethodSigCallback: TypeAlias = Callable[[MethodSigContext], CallableType]
5858

5959

6060
# Interface

0 commit comments

Comments
 (0)