ITADN

Returns mypy plugin crashes with mypy 1.16

#2148ClosedJazzinghen 创建于 2025-05-30
bug
J
Jazzinghencommented
# Bug report <!-- Hi, thanks for submitting a bug. We appreciate that. But, we will need some information about what's wrong to help you. --> ## What's wrong <!-- Describe what is not working. Please, attach a traceback. --> When using Return's plugin mypy crashes with the following error: ```shell $ uv run mypy --show-traceback -p data_manager hidden_path/.venv/lib/python3.13/site-packages/returns/primitives/hkt.py:87: error: INTERNAL ERROR -- Please try using mypy master on GitHub: https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build Please report a bug at https://github.com/python/mypy/issues version: 1.16.0 Traceback (most recent call last): File "mypy/checker.py", line 577, in accept File "mypy/nodes.py", line 1396, in accept File "mypy/checker.py", line 3079, in visit_assignment_stmt File "mypy/checker.py", line 3306, in check_assignment File "mypy/checker.py", line 3432, in check_compatibility_all_supers File "mypy/checker.py", line 3578, in node_type_from_base File "mypy/checkmember.py", line 378, in analyze_instance_member_access File "mypy/checkmember.py", line 564, in analyze_member_var_access File "mypy/checkmember.py", line 935, in analyze_var File "hidden_path/.venv/lib/python3.13/site-packages/returns/contrib/mypy/_typeops/fallback.py", line 25, in decorator return function(*args, **kwargs) File "hidden_path/.venv/lib/python3.13/site-packages/returns/contrib/mypy/_features/kind.py", line 65, in attribute_access return analyze_member_access( ctx.context.name, # type: ignore ...<8 lines>... in_literal_context=exprchecker.is_literal_context(), ) TypeError: 'msg' is an invalid keyword argument for analyze_member_access() hidden_path/.venv/lib/python3.13/site-packages/returns/primitives/hkt.py:87: : note: use --pdb to drop into pdb ``` It seems like Mypy 1.16.0 has deprecated passing `msg` to the `analyze_member_access` function: https://github.com/python/mypy/pull/18818 ## How is that should be <!-- Describe how it should work. --> Mypy should run without crashing when using Returns' plugin ## System information - `python` version: `1.13.0` - `returns` version: `0.25.0` - `mypy` version: `1.16.0`
关闭于 2025-07-23 2 条评论