Error importing plugin "classes.contrib.mypy.classes_plugin" cannot import name 'union_items' from 'mypy.types'
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện import Python 3.11 từ issue và kiểm tra classes/contrib/mypy/typeops/call_signatures.py, nơi traceback cho thấy import mypy.types bị lỗi. Kiểm tra khả năng tương thích của mypy đã cài đặt và xác minh rằng việc import classes.contrib.mypy.classes_plugin hoàn tất mà không có lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug report
What's wrong
I am hitting the error on a clean installation with python3.11 on MacOS.
Python 3.11.1 (main, Dec 12 2022, 14:17:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import classes.contrib.mypy.classes_plugin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/classes_plugin.py", line 33, in <module>
from classes.contrib.mypy.features import associated_type, supports, typeclass
File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/features/typeclass.py", line 17, in <module>
from classes.contrib.mypy.typeops import (
File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/typeops/call_signatures.py", line 9, in <module>
from mypy.types import TypeVarType, union_items
ImportError: cannot import name 'union_items' from 'mypy.types' (/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/mypy/types.cpython-311-darwin.so)
How is that should be
No errors
System information
pythonversion:classesversion:mypyversion:
- Ngôn ngữ chính
- Python
- Star
- 730
- Fork
- 30
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dry-python/classes
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
dry-python/classes#496 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
dry-python/classes#494 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
dry-python/classes#492 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
dry-python/classes#386 ·
-
Crash: lookup of unknown name Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
dry-python/classes#330 · 1 bình luận ·
Tất cả issue của dry-python/classes
Issue tương tự
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Đang mởarea: ci bug perceived difficulty: 3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/clickhouse-connect#1057 ·