Repository navigation
Restore parenthesized except clause in ImportrrScheduler.run - #68
curfew-marathon wants to merge 1 commit into
Conversation
PR #67 dropped the parentheses around except (KeyboardInterrupt, SystemExit), leaving except KeyboardInterrupt, SystemExit. That only parses because PEP 758 (Python 3.14+) permits unparenthesized exception tuples, so it happens to work on this project's pinned Python 3.15, but it is a SyntaxError on any earlier Python 3 interpreter and is indistinguishable from invalid Python 2 syntax at a glance. Restoring the tuple form keeps the behavior unchanged while making it portable and unambiguous.
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
|
Closing without merging: ruff format --check actively enforces the unparenthesized except (KeyboardInterrupt, SystemExit) form as canonical for target-version = py315 (PEP 758), so this change fights the project's own formatter. Confirmed CI (ruff format --check) rejects the parenthesized form. Main's existing syntax is correct and intentional given the pinned Python 3.15 target; no fix needed. |
Summary
except (KeyboardInterrupt, SystemExit):, leavingexcept KeyboardInterrupt, SystemExit:.Test plan
pytest --covsuite orruff/mypylocally (tools not available in this environment); this is a one-line revert to the prior, already-tested syntax.Summary by CodeRabbit