Skip to content

fix: initialize Leaf.bracket_depth in __init__#5221

Open
mayank-dev-15 wants to merge 1 commit into
psf:mainfrom
mayank-dev-15:fix-bracket-depth
Open

fix: initialize Leaf.bracket_depth in __init__#5221
mayank-dev-15 wants to merge 1 commit into
psf:mainfrom
mayank-dev-15:fix-bracket-depth

Conversation

@mayank-dev-15

@mayank-dev-15 mayank-dev-15 commented Jul 4, 2026

Copy link
Copy Markdown

Fixes #5214, closes #5215

�racket_depth was declared as int in the Leaf class but never initialized in Leaf.init, which could cause AttributeError when accessing it before �rackets.py sets it.

@cobaltt7

cobaltt7 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

As I said in #5215:

Please also add a python test case file that provides an example of code that crashes without this fix.

Additionally, please add a changelog entry.

@cobaltt7 cobaltt7 mentioned this pull request Jul 5, 2026
4 tasks
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.

Leaf.bracket_depth not initialized

2 participants