https://github.com/python/cpython/commit/573589cf75f8fd60221aa46cf0fca06039e0c7a6
commit: 573589cf75f8fd60221aa46cf0fca06039e0c7a6
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: picnixz <[email protected]>
date: 2025-08-30T09:51:25Z
summary:

[3.13] gh-138257: Fix internal `RuleCollectorVisitor` attribute name 
(GH-138208) (#138260)

gh-138257: Fix internal `RuleCollectorVisitor` attribute name (GH-138208)

The internal `RuleCollectorVisitor` class had an attribute named "rulses"
instead of "rules" that other `GrammarVisitor` subclasses define.
(cherry picked from commit 11217a883da324b85a290f5d78f090d8f4880f16)

Co-authored-by: chemelnucfin <[email protected]>

files:
M Tools/peg_generator/pegen/parser_generator.py

diff --git a/Tools/peg_generator/pegen/parser_generator.py 
b/Tools/peg_generator/pegen/parser_generator.py
index a2f1c08330f713..9862b619424964 100644
--- a/Tools/peg_generator/pegen/parser_generator.py
+++ b/Tools/peg_generator/pegen/parser_generator.py
@@ -44,7 +44,7 @@ class RuleCollectorVisitor(GrammarVisitor):
     """Visitor that invokes a provieded callmaker visitor with just the 
NamedItem nodes"""
 
     def __init__(self, rules: Dict[str, Rule], callmakervisitor: 
GrammarVisitor) -> None:
-        self.rulses = rules
+        self.rules = rules
         self.callmaker = callmakervisitor
 
     def visit_Rule(self, rule: Rule) -> None:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to