STDLIB.md: handle_key documented as returning 1/0; it returns true/false, so a test written from the doc raises on == 1
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 85/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bash, python
- Ambito
- documentation
Direzione di ricerca
Il testo obsoleto si trova in docs/STDLIB.md intorno alla riga 880, nel paragrafo su handle_key che dice che restituisce 1 o 0. Leggi lib/ui.eigs (righe 606-627) per confermare che la funzione restituisce true/false, poi controlla la riga della tabella vicino alla riga 2246, che è già corretta. È fatto quando il testo dice true/false, bash tools/docs_claims_check.sh passa e python3 tests/test_doc_examples.py docs/STDLIB.md passa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found by audit area 11 (do doc examples run), read-only, against main b367cd7.
docs/STDLIB.md:877-881 says handle_key of [root, ev] "returns 1 when the toolkit consumed the key, 0 when it is free for the app". The function returns booleans: lib/ui.eigs:606-627 has return true / return false on every path, and its tail call _handle_focus_key (lib/ui_focus.eigs:58) also returns true/false.
Why it matters: the paragraph is written for headless tests ("a headless test drives keys exactly like mouse"), and the natural test assertion follows the doc:
consumed is true
print of (consumed == 1)
$ ./src/eigenscript repro.eigs
Error repro.eigs:2: cannot compare bool and num with '=='
So a test written from the doc dies instead of asserting. The table row at docs/STDLIB.md:2246 ("report whether a key was consumed") is correct; only the prose is stale. A search of docs/STDLIB.md, docs/BUILTINS.md, docs/llms.txt, docs/SYNTAX.md, README.md and AGENTS.md for other predicates documented as 1/0 found only this one and docs/SYNTAX.md:407 (filed with the SYNTAX.md issue). task_detach's documented 1/0 (docs/BUILTINS.md:920) matches what it returns.
Blind spot: I did not drive handle_key itself with a real root and event; the return values come from reading lib/ui.eigs, and the error comes from running the comparison.
Done when
-
docs/STDLIB.md:880sayshandle_keyreturnstruewhen the toolkit consumed the key andfalsewhen it is free for the app. -
bash tools/docs_claims_check.shandpython3 tests/test_doc_examples.py docs/STDLIB.mdpass.
— Duet (orchestrator)
Generated by Claude Code
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 6h 26m
- PR unite (30g)
- 318
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un 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 InauguralSystems/EigenScript
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
InauguralSystems/EigenScript#2311 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
InauguralSystems/EigenScript#2305 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:ci bug found-by:duet-audit
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
InauguralSystems/EigenScript#2283 ·
I maintainer di solito rispondono entro 1 giorno
-
area:docs found-by:duet-audit kind:docs-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
InauguralSystems/EigenScript#2282 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
X11 title and ctype tests pick their display from $$ and can silently attach to a foreign X serverApertaarea:gfx kind:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
InauguralSystems/EigenScript#2216 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
respond_to? on a poly receiver answers true for a program class's private or protected methodAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
bug core p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
RunanywhereAI/runanywhere-sdks#1258 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
rocketproplab/phoenix-fc-sensor-board#18 · 1 commento ·
-
Plugin mapper: latency_samples is 0 for eight UAD 11.8.3 plug-ins that delay by 55-56 samplesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
rolotrealanis98/open-apollo#126 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue no-disc-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Jstar269/nakagawa-recomp#1981 ·
I maintainer di solito rispondono entro 1 giorno