Repository navigation
feat: everyday syntax coverage and tolerant check - #26
Merged
Merged
Conversation
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 item "Complete the PyHIR node set" (§3.2) and most of the open PyIR instructions (§6), plus a tolerant
--check.test: define everyday syntax coverage and tolerant check), implementation follows.AugAssign, assignment targets may be attributes, items or unpacked tuples,Tuple/List/Dictliterals,BoolOp, chained comparisons (lowered toand),With/WithItem,Assert, keyword-argument unpacking, andHIR_SCHEMA_VERSION. Star arguments stay an explicit diagnostic.withtargets and unpacked names and evaluates defaults and decorators in the enclosing scope; import analysis walkswithbodies.withbody is laid out inline between syntheticEnterWith/ExitWithstatements; an early exit skips the exit (no exception edges yet).Callkeywords,SetAttr,SetItem,BuildList,BuildTuple,BuildDict,BoolOp,WithEnter,WithExit,Assert; operands and substitution recurse through nested tuples generically. Methods of module-level classes are lowered and namedClass.method; other module-level statements are skipped instead of rejected.subprocess.run(["sh", "-c", cmd])is caught.--checkno longer aborts on a function outside the subset: it emits anunsupported-syntaxnote (severity info) for that function and analyses the others. Plugins see only the analysable functions throughPluginContext.functions().Not in this PR:
Tryand exception edges,Lambda,Await/Yield, star arguments, nested function definitions (closures), which remain explicit diagnostics.Part of #25: everything but
awaitandyield, which stay open there withTry,Lambda, star arguments and closures.