Skip to content

Preserve method-level v_args on static and class methods - #1684

Open
FanWu-ai wants to merge 1 commit into
lark-parser:masterfrom
FanWu-ai:fix-vargs-descriptor-precedence-20261021
Open

FanWu-ai wants to merge 1 commit into
lark-parser:masterfrom
FanWu-ai:fix-vargs-descriptor-precedence-20261021

Conversation

@FanWu-ai

Copy link
Copy Markdown

Summary

  • Preserve method-level v_args settings when staticmethod or classmethod is the outer decorator.
  • Honor the documented precedence over class-level settings instead of wrapping the callback again.
  • Cover both descriptor types, both decorator orders, and ordinary, meta, and tree arguments (12 regression cases).

Validation

  • Regression on original code: 6 cases fail; all pass with this change.
  • Python 3.10.22 full suite: 1338 tests, OK (148 existing skips), including all 8 Nearley tests with unchanged Js2Py==0.68.
  • Pristine Python 3.10 baseline: 1337 tests, OK (148 existing skips).
  • Python 3.12 and 3.13 full suites: 1330 tests, OK (148 existing skips); Nearley is unavailable on these interpreters due to pinned Js2Py compatibility.
  • mypy==1.12: all 34 source files pass.
  • All configured pre-commit checks pass; git diff --check passes.

AI assistance was used to investigate, implement, and test this change.

@FanWu-ai
FanWu-ai marked this pull request as ready for review October 20, 2026 21:37

This branch has not been deployed

No deployments
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