diff options
author | ptmcg <ptmcg@austin.rr.com> | 2022-07-14 03:35:10 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2022-07-14 03:35:10 -0500 |
commit | 06c12f685b5d0e29f01abc842dff8d268d93ffbf (patch) | |
tree | 720b0faafd07b602965918c88dc981958dba50ee /pyparsing/helpers.py | |
parent | c74949d0cafbe7c136a54777b9b340c37f00b484 (diff) | |
download | pyparsing-git-06c12f685b5d0e29f01abc842dff8d268d93ffbf.tar.gz |
Add type annotations
Diffstat (limited to 'pyparsing/helpers.py')
-rw-r--r-- | pyparsing/helpers.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index f3e0ab5..c4ac2a9 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -294,6 +294,7 @@ def one_of( symbols: List[str] = [] if isinstance(strs, str_type): + strs = typing.cast(str, strs) symbols = strs.split() elif isinstance(strs, Iterable): symbols = list(strs) @@ -570,6 +571,8 @@ def nested_expr( raise ValueError("opening and closing strings cannot be the same") if content is None: if isinstance(opener, str_type) and isinstance(closer, str_type): + opener = typing.cast(str, opener) + closer = typing.cast(str, closer) if len(opener) == 1 and len(closer) == 1: if ignoreExpr is not None: content = Combine( |