Skip to content

Fix keyword-only arg crash, max_iterations=0 NameError, and format_boundargs TypeError - #501

Merged
pschanely merged 2 commits into
pschanely:mainfrom
Dev9269:fix-crosshair-bugs
Aug 7, 2026
Merged

Fix keyword-only arg crash, max_iterations=0 NameError, and format_boundargs TypeError#501
pschanely merged 2 commits into
pschanely:mainfrom
Dev9269:fix-crosshair-bugs

Conversation

@Dev9269

@Dev9269 Dev9269 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes three crashes:

  1. condition_parser._extract_a_and_kw — KEYWORD_ONLY parameters were appended to both positional and keyword args, crashing on re-call for deal contracts. Now handled via \param.kind\ including VAR_KEYWORD/VAR_POSITIONAL.
  2. core.analyze_calltree — \max_iterations=0\ raised \NameError: i not defined\ in the iteration-count debug message.
  3. util.format_boundargs — unbound VAR_POSITIONAL/VAR_KEYWORD args fell back to \inspect._empty, raising TypeError. Now defaults to ()\ / {}.

Tests

Added: \ est_deal_pre_keyword_only_arg, \ est_max_iterations_zero_does_not_crash, \ est_format_boundargs_without_varargs.
Affected files: 133 passed, 3 skipped.

@pschanely

Copy link
Copy Markdown
Owner

@Dev9269 This is lovely - thank you! Would you like to add yourself with a link of your choice to changelog.rst?

@pschanely

Copy link
Copy Markdown
Owner

@Dev9269 This is lovely - thank you! Would you like to add yourself with a link of your choice to changelog.rst?

Gonna merge this to get it in, but feel free to open another PR if so!

@pschanely
pschanely merged commit 632372c into pschanely:main Aug 7, 2026
15 checks passed
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