diff options
author | ptmcg <ptmcg@austin.rr.com> | 2021-10-24 08:52:38 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2021-10-24 08:52:38 -0500 |
commit | 5d6c14a959d1eb3f7c178c10fba34326058a2166 (patch) | |
tree | 0f0e9105d475a3a155551d535e278934febabc3d /pyparsing/helpers.py | |
parent | 074f058ebc07280a49209239db8ae94cda72addb (diff) | |
download | pyparsing-git-5d6c14a959d1eb3f7c178c10fba34326058a2166.tar.gz |
Fixed bug where warn_on_multiple_string_args_to_oneof warning is raised even when not enabled
Diffstat (limited to 'pyparsing/helpers.py')
-rw-r--r-- | pyparsing/helpers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index 1aa8b5e..505f7bc 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -1,6 +1,7 @@ # helpers.py import html.entities +from . import __diag__ from .core import * from .util import _bslash, _flatten, _escapeRegexRangeChars @@ -223,7 +224,7 @@ def one_of( asKeyword = asKeyword or as_keyword useRegex = useRegex and use_regex - if isinstance(caseless, str_type): + if isinstance(caseless, str_type) and __diag__.warn_on_multiple_string_args_to_oneof: warnings.warn( "More than one string argument passed to one_of, pass" " choices as a list or space-delimited string", |