dry-python / dry-python/returns

Pylint hangs when running on a module that has type annotations from returns

Đang mở
#792 8 bình luận 4 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
4.4k
Fork
155
Merge trung bình
2 giờ 27 phút
Pull request đã merge (30 ngày)
22

Mô tả

I've noticed pylint is hanging (vscode's python plugin started to consume 100% CPU) when trying to lint a module that has type annotations from returns library.

Consider the following `test.py`:
```python
from returns.maybe import Maybe, Some

x: Maybe[int] = Some(1)
```
Running `pylint test.py` will hang forever.

Not sure if the problem is with returns or pylint itself (or maybe something with my local setup, tried both with my regular pylint config and without it though). Didn't spend much time debugging it, but sometimes I noticed it hangs in `astroid.decorators.raise_if_nothing_inferred` generator. Does anyone experience the same?

```
python: 3.7.9, 3.9.0
pylint: 2.6.0
astroid: 2.4.2
returns: 0.15.0
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.