mirror of
https://github.com/python/cpython
synced 2024-10-14 16:26:35 +00:00
gh-108455: peg generator: Use strict_optional=True
for grammar_parser
(#108629)
This commit is contained in:
parent
30305d6d01
commit
f8be2e262c
|
@ -14,8 +14,5 @@ enable_error_code = truthy-bool,ignore-without-code
|
||||||
warn_return_any = False
|
warn_return_any = False
|
||||||
warn_unreachable = False
|
warn_unreachable = False
|
||||||
|
|
||||||
[mypy-pegen.grammar_parser]
|
|
||||||
strict_optional = False
|
|
||||||
|
|
||||||
[mypy-setuptools.*]
|
[mypy-setuptools.*]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
|
@ -349,7 +349,7 @@ def initial_names(self) -> AbstractSet[str]:
|
||||||
|
|
||||||
Plain = Union[Leaf, Group]
|
Plain = Union[Leaf, Group]
|
||||||
Item = Union[Plain, Opt, Repeat, Forced, Lookahead, Rhs, Cut]
|
Item = Union[Plain, Opt, Repeat, Forced, Lookahead, Rhs, Cut]
|
||||||
RuleName = Tuple[str, str]
|
RuleName = Tuple[str, Optional[str]]
|
||||||
MetaTuple = Tuple[str, Optional[str]]
|
MetaTuple = Tuple[str, Optional[str]]
|
||||||
MetaList = List[MetaTuple]
|
MetaList = List[MetaTuple]
|
||||||
RuleList = List[Rule]
|
RuleList = List[Rule]
|
||||||
|
|
Loading…
Reference in a new issue