Skip to content

Support class keyword arguments and any assignable with target - #86

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
feat/class-keywords-with-targets
Sep 5, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
feat/class-keywords-with-targets

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

Syntax item of #71 found by the broadened corpus: class keyword arguments and general with targets.

  • Acceptance tests first (test: define class keyword arguments and general with targets), implementation follows.
  • class Task(Base, metaclass=Register): the HIR Class keeps its keywords; the scope analysis and the lowering of a local class evaluate them where the class is defined. Methods of such classes are analysed like any other.
  • with ctx() as self.conn, as d["k"], as (a, b): a WithItem target is any assignable target, bound through the scope analysis and stored through the lowering like an assignment, so it receives what the context manager enters.
  • Snapshots: luigi goes from 245 to 259 files analysed (4 462 to 5 169 functions), httpie to 132/132, the FastAPI template to 42/43; the 18 syntax-error notes disappear and two findings appear in the newly analysed files, a subprocess call in httpie's upload tests and a credential-named field default in the template's models.
  • The usage guide lists the two forms.

Part of #71.

@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 5, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit 49fd179 into main Sep 5, 2026
10 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the feat/class-keywords-with-targets branch September 5, 2026 16:54
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