File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11from collections .abc import Sequence
22from enum import Enum , unique
3+ from importlib .metadata import version
34from typing import Any
45
56from mypy .checkmember import analyze_member_access
2223 get_proper_type ,
2324)
2425from mypy .types import Type as MypyType
25- from mypy .version import __version__ as mypy_version
2626
2727from returns .contrib .mypy ._typeops .fallback import asserts_fallback_to_any
2828from returns .contrib .mypy ._typeops .visitor import translate_kind_instance
@@ -64,6 +64,7 @@ def attribute_access(ctx: AttributeContext) -> MypyType:
6464 return ctx .default_attr_type
6565
6666 exprchecker = ctx .api .expr_checker # type: ignore
67+ mypy_version = version ('mypy' )
6768 mypy_version_tuple = tuple (
6869 map (int , mypy_version .partition ('+' )[0 ].split ('.' ))
6970 )
Original file line number Diff line number Diff line change 11from collections .abc import Sequence
2+ from importlib .metadata import version
23from types import MappingProxyType
34from typing import Any , Final , Literal , overload
45
56from mypy .checkmember import analyze_member_access
67from mypy .nodes import ARG_NAMED , ARG_OPT
78from mypy .types import CallableType , FunctionLike , ProperType , get_proper_type
89from mypy .types import Type as MypyType
9- from mypy .version import __version__ as mypy_version
1010
1111from returns .contrib .mypy ._structures .args import FuncArg
1212from returns .contrib .mypy ._structures .types import CallableContext
@@ -119,6 +119,7 @@ def translate_to_function(
119119 """
120120 checker = ctx .api .expr_checker # type: ignore
121121
122+ mypy_version = version ('mypy' )
122123 mypy_version_tuple = tuple (
123124 map (int , mypy_version .partition ('+' )[0 ].split ('.' ))
124125 )
You can’t perform that action at this time.
0 commit comments