diff options
author | ptmcg <ptmcg@austin.rr.com> | 2021-10-23 10:44:18 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2021-10-23 10:44:18 -0500 |
commit | fa7c27e5afa9c0939e06043e3ecb955ccd9aea88 (patch) | |
tree | 87210d8e28068f755444ecf84de66ee6f559608a /pyparsing/helpers.py | |
parent | 73c84d7fa11c51a83a177afa8f48a3b514057004 (diff) | |
download | pyparsing-git-fa7c27e5afa9c0939e06043e3ecb955ccd9aea88.tar.gz |
Clean up warning and exception messages with oneOf -> one_of
Diffstat (limited to 'pyparsing/helpers.py')
-rw-r--r-- | pyparsing/helpers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index de92035..1aa8b5e 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -225,7 +225,7 @@ def one_of( if isinstance(caseless, str_type): warnings.warn( - "More than one string argument passed to oneOf, pass" + "More than one string argument passed to one_of, pass" " choices as a list or space-delimited string", stacklevel=2, ) @@ -245,7 +245,7 @@ def one_of( elif isinstance(strs, Iterable): symbols = list(strs) else: - raise TypeError("Invalid argument to oneOf, expected string or iterable") + raise TypeError("Invalid argument to one_of, expected string or iterable") if not symbols: return NoMatch() @@ -279,7 +279,7 @@ def one_of( ) except sre_constants.error: warnings.warn( - "Exception creating Regex for oneOf, building MatchFirst", stacklevel=2 + "Exception creating Regex for one_of, building MatchFirst", stacklevel=2 ) # last resort, just use MatchFirst |