Skip to content

fix: catch dedented return and check after any edit (0.4.2) - #3

Merged
raf-li merged 1 commit into
mainfrom
fix/live-check-edits
Oct 8, 2026
Merged

raf-li merged 1 commit into
mainfrom
fix/live-check-edits

Conversation

@raf-li

@raf-li raf-li commented Oct 8, 2026

Copy link
Copy Markdown
Member

Reported while coding: removing a line's indentation gave no error.

  • Python is compiled, not only parsed (nothing is run). Parsing accepts return or break that a removed indentation moved outside its function or loop; compiling reports them ("'return' outside function"). A line moved out of a block on purpose stays valid Python and is no problem, as before.
  • The check for new problems runs after any edit, not only after a typed character: Delete, Backspace, control+Backspace, control+Delete, cut and paste (control+X/V, shift+Delete/Insert), and Code Compass's own commands such as shift+Tab and line moves. The known problems are noted before the change, so only new ones sound. NVDA's own behaviour for those keys is kept.

505 tests pass. Merging publishes 0.4.2 (buildVars.py and CHANGELOG.md updated; docs in English and Indonesian updated).

🤖 Generated with Claude Code

Removing a line's indentation in Python so that return or break lands
outside its function or loop parsed fine, so no problem was reported.
Python code is now compiled (still without running anything), which
reports those. And the check for new problems ran only after a typed
character: deleting (Delete, Backspace, control+Backspace,
control+Delete), cutting, pasting and Code Compass's own commands such
as shift+Tab now schedule it too, with the known problems noted before
the change. Version 0.4.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raf-li
raf-li merged commit f821a71 into main Oct 8, 2026
3 checks passed
@raf-li
raf-li deleted the fix/live-check-edits branch October 8, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant