Skip to content

Commit

Permalink
pythongh-108455: Use strict_optional=True for grammar_parser
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Aug 29, 2023
1 parent c879b9f commit 2d5e594
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions Tools/peg_generator/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ strict = True
warn_return_any = False
no_implicit_reexport = False

[mypy-pegen.grammar_parser]
strict_optional = False

[mypy-setuptools.*]
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion Tools/peg_generator/pegen/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def initial_names(self) -> AbstractSet[str]:

Plain = Union[Leaf, Group]
Item = Union[Plain, Opt, Repeat, Forced, Lookahead, Rhs, Cut]
RuleName = Tuple[str, str]
RuleName = Tuple[str, Optional[str]]
MetaTuple = Tuple[str, Optional[str]]
MetaList = List[MetaTuple]
RuleList = List[Rule]
Expand Down

0 comments on commit 2d5e594

Please sign in to comment.