Class turned into a variable isn't updated if re-exported

Đang mở
#4,775 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
compilers

Hướng nghiên cứu

Start with the fine-grained test case testGoodBaseClassSpoiled and reproduce the two-run scenario using the embedded a.py, b.py, and c.py files. Trace how the re-exported B change is handled when c.py.2 turns it into an integer. Done means the second run reports that a.C no longer has a valid base class, as it does when the re-export is removed.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug topic-fine-grained-incremental

Consider this test case in fine grained mode:

[case testGoodBaseClassSpoiled]
import a
[file a.py]
import b
class C(b.B):
    pass
[file b.py]
from c import B
[file c.py]
class B:
    pass
[file c.py.2]
B = 1
[out]

Currently, mypy doesn't give any error on the second run, although base class is not more valid. If I remove the re-export, then everything works fine.

Ngôn ngữ chính
Python
Star
20.6k
Fork
3.3k
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
54

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python/mypy

Tất cả issue của python/mypy

Issue tương tự

Thêm issue về Python

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.