feat: a Python class attribute that holds a descriptor from another file becomes an ordinary field
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 0
- 派生
- 0
- 平均合并
- 7 小时 42 分钟
- 30 天内合并 PR
- 111
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
seanb4t/codegraph-go 的其他 Issue
-
chore needs-triage
难度 1/5 1 小时以内 新手友好度 88/100
seanb4t/codegraph-go#380 ·
维护者通常 1 天内回复
-
chore needs-triage
难度 2/5 1-3 小时 新手友好度 82/100
seanb4t/codegraph-go#379 ·
维护者通常 1 天内回复
-
area:query chore needs-triage spec-needed
难度 2/5 1-3 小时 新手友好度 74/100
seanb4t/codegraph-go#377 ·
维护者通常 1 天内回复
-
chore needs-triage
难度 1/5 1-3 小时 新手友好度 84/100
seanb4t/codegraph-go#362 ·
维护者通常 1 天内回复
-
area:query bug needs-triage
难度 2/5 1-3 小时 新手友好度 80/100
seanb4t/codegraph-go#355 ·
维护者通常 1 天内回复
查看 seanb4t/codegraph-go 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
OneBusAway/maglev#2145 ·
维护者通常 2 天内回复
-
priority/medium status/ready type/chore
难度 2/5 1-3 小时 新手友好度 84/100
discobox-ai/discobox#1357 ·
维护者通常 1 天内回复
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for it可能已有人在做 @fzn0x 今天认领。 未关闭bug priority: low
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
edit_file diff rendering panics on invalid UTF-8 text可能已有人在做 @TDnorthgarden 今天认领。 未关闭area/tui
难度 2/5 1-3 小时 新手友好度 85/100
docker/docker-agent#4955 ·
维护者通常 1 天内回复
-
enhancement ui/ux
难度 2/5 1-3 小时 新手友好度 68/100
jbigler/railswitch#243 ·
维护者通常 1 天内回复