feat: a Python class attribute that holds a descriptor from another file becomes an ordinary field
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 0
- Merge medio
- 7h 42m
- PR unite (30g)
- 111
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di seanb4t/codegraph-go
-
chore needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
seanb4t/codegraph-go#380 ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
seanb4t/codegraph-go#379 ·
I maintainer di solito rispondono entro 1 giorno
-
area:query chore needs-triage spec-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
seanb4t/codegraph-go#377 ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
seanb4t/codegraph-go#362 ·
I maintainer di solito rispondono entro 1 giorno
-
area:query bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
seanb4t/codegraph-go#355 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di seanb4t/codegraph-go
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
automated documentation maintenance
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
github/gh-aw-mcpg#16717 ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deletedApertainternal
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
jesseduffield/lazygit#6229 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
prometheus/prometheus#20482 ·
I maintainer di solito rispondono entro 2 giorni