dry-python / dry-python/returns

Crash with mypy plugin on mypy 0.961

オープン
#1,433 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
4.4k
フォーク
155
平均マージ
2時間 27分
マージ済み PR(30日)
22

説明

# Bug report

## What's wrong

```
Traceback (most recent call last):
File "mypy/checkexpr.py", line 3991, in accept
File "mypy/nodes.py", line 1760, in accept
File "mypy/checkexpr.py", line 305, in visit_call_expr
File "mypy/checkexpr.py", line 383, in visit_call_expr_inner
File "mypy/checkexpr.py", line 892, in check_call_expr_with_callee_type
File "mypy/checkexpr.py", line 957, in check_call
File "mypy/checkexpr.py", line 1085, in check_callable_call
File "mypy/checkexpr.py", line 763, in apply_function_plugin
File ".pyenv/versions/3.9.7/envs/venv/lib/python3.9/site-packages/returns/contrib/mypy/_features/partial.py", line 62, in analyze
return _PartialFunctionReducer(
File ".pyenv/versions/3.9.7/envs/venv/lib/python3.9/site-packages/returns/contrib/mypy/_features/partial.py", line 131, in new_partial
fallback, intermediate = self._create_intermediate(case_function)
File ".pyenv/versions/3.9.7/envs/venv/lib/python3.9/site-packages/returns/contrib/mypy/_features/partial.py", line 150, in _create_intermediate
return intermediate, analyze_call(
File ".pyenv/versions/3.9.7/envs/venv/lib/python3.9/site-packages/returns/contrib/mypy/_typeops/analtype.py", line 55, in analyze_call
messages = checker.msg if show_errors else checker.msg.clean_copy()
AttributeError: 'MessageBuilder' object has no attribute 'clean_copy'
```

## How is that should be

Don't use `MessageBuilder.clean_copy` (removed in https://github.com/python/mypy/pull/12631)

## System information

- `python` version: 3.9
- `returns` version: 0.19
- `mypy` version: 0.961

- `hypothesis` version (if any):
- `pytest` version (if any):

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。