gh-108455: peg generator: Use `strict_optional=True` for `grammar_parser` (#108629)

This commit is contained in:
Nikita Sobolev 2023-08-29 15:02:52 +03:00 committed by GitHub
parent 30305d6d01
commit f8be2e262c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -14,8 +14,5 @@ enable_error_code = truthy-bool,ignore-without-code
warn_return_any = False
warn_unreachable = False
[mypy-pegen.grammar_parser]
strict_optional = False
[mypy-setuptools.*]
ignore_missing_imports = True

View File

@ -349,7 +349,7 @@ class Cut:
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]