feat: a Python class attribute that holds a descriptor from another file becomes an ordinary field
Maintainer thường phản hồi trong vòng 1 ngày
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
- 30/100
Hướng nghiên cứu
Start in internal/indexer/pyextract/data.go at descriptorClasses (around line 285), which only collects descriptor classes defined in the current file. Read openspec/specs/data-symbols/spec.md near line 92, since it requires descriptors to stay unresolved, and the archived symbol-and-reference-completeness design. Done means choosing one of the two proposed behaviours and showing that a cross-module descriptor attribute no longer resolves to a field, with tests covering that case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What exists today?
Python descriptor detection in the Python extractor: descriptorClasses in internal/indexer/pyextract/data.go (line 285).
How does it behave now?
descriptorClasses finds only the classes in the file being extracted that define __get__, __set__ or __delete__. A class-body attribute bound to an instance of such a class declares no field.
A descriptor class imported from another module is not found. Its attribute is then an ordinary field, and reads through an instance resolve to that field.
docs/LANGUAGE-CAPABILITY-MATRIX.md line 144 documents this for python. The archived design.md for symbol-and-reference-completeness records it as a limit.
How should it behave?
Either option removes the definitive field target for an attribute that the index cannot tie to a descriptor. The first option detects descriptor classes across files, for example by resolving the initializer's class after extraction and checking its members. The second option leaves an attribute bound to an instance of an unresolved class without a definitive field target.
What kind of improvement?
Correctness in an edge case.
Would this change existing behavior?
Yes, for an attribute bound to a descriptor from another module. Its reads no longer resolve to a field that the descriptor replaces.
Before submitting
- I searched existing issues and this is not a duplicate
- I checked that the current behavior is not a deliberate decision in
openspec/specs/
The last box stays unchecked. openspec/specs/data-symbols/spec.md line 92 requires descriptors to remain unresolved, and this issue asks for a narrower rule for the cross-file case.
- Ngôn ngữ chính
- Go
- Star
- 0
- Fork
- 0
- Merge trung bình
- 7 giờ 42 phút
- Pull request đã merge (30 ngày)
- 111
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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 seanb4t/codegraph-go
-
chore needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
seanb4t/codegraph-go#380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
seanb4t/codegraph-go#379 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query chore needs-triage spec-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
seanb4t/codegraph-go#377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
seanb4t/codegraph-go#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
seanb4t/codegraph-go#355 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của seanb4t/codegraph-go
Issue tương tự
-
go-vulnerability security-scan
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
teslashibe/agent-go#35 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alecthomas/chroma#1498 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày