Skip to content

Leverage ast.NodeVisitor#157

Merged
liamhuber merged 5 commits intomainfrom
leverage-ast
Feb 24, 2026
Merged

Leverage ast.NodeVisitor#157
liamhuber merged 5 commits intomainfrom
leverage-ast

Conversation

@liamhuber
Copy link
Member

@samwaseda introduced me to it in #155. IMO this makes the model parsers easier to read and more ast-idiomatic. Should make it slightly easier to extend the parser to accommodate even more python syntax in the future.

of the WorkflowParser, instead of kicking it around

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Instead of the runtime method binding. The subclass doesn't strictly satisfy LSP, but we use it in this place and this place only so I can live with it.

I massaged the generic visit "don't recognize this" error message a little.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
The callers don't actually use all those internal visit nodes, so just specify the actual interface

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch pyiron/flowrep/leverage-ast

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.94%. Comparing base (d376d6b) to head (1ac15ca).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
- Coverage   98.94%   98.94%   -0.01%     
==========================================
  Files          27       27              
  Lines        1903     1901       -2     
==========================================
- Hits         1883     1881       -2     
  Misses         20       20              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
@samwaseda
Copy link
Member

FYI, I was also only vaguely aware of ast.NodeVisitor. It was more ChatGPT that introduced it to me...

@liamhuber liamhuber merged commit 0813585 into main Feb 24, 2026
20 checks passed
@liamhuber liamhuber deleted the leverage-ast branch February 24, 2026 15:22
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.

2 participants