diff options
author | ptmcg <ptmcg@austin.rr.com> | 2021-08-01 22:44:05 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2021-08-01 22:44:05 -0500 |
commit | 2a8cc13540e86dda9c66c415cf13dcfff8b6a1e3 (patch) | |
tree | 9b3d06e1be1608f4ffe83cb05e930386a8a4bb6a | |
parent | 918aa07f41bd3a619a45dc28da0048585216469b (diff) | |
download | pyparsing-git-2a8cc13540e86dda9c66c415cf13dcfff8b6a1e3.tar.gz |
Successful rename in results.py with module level and class level names; blackened changes
-rw-r--r-- | pyparsing/core.py | 23 | ||||
-rw-r--r-- | pyparsing/helpers.py | 2 |
2 files changed, 18 insertions, 7 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index 615f39b..519f8de 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -161,7 +161,19 @@ def enable_all_warnings(): del __config_flags # build list of single arg builtins, that can be used as parse actions -_single_arg_builtins = {sum, len, sorted, reversed, list, tuple, set, any, all, min, max} +_single_arg_builtins = { + sum, + len, + sorted, + reversed, + list, + tuple, + set, + any, + all, + min, + max, +} _generatorType = types.GeneratorType @@ -279,7 +291,9 @@ def _default_start_debug_action(instring, loc, expr, cache_hit=False): ) -def _default_success_debug_action(instring, startloc, endloc, expr, toks, cache_hit=False): +def _default_success_debug_action( + instring, startloc, endloc, expr, toks, cache_hit=False +): cache_hit_str = "*" if cache_hit else "" print("{}Matched {} -> {}".format(cache_hit_str, expr, toks.asList())) @@ -842,7 +856,6 @@ class ParserElement(ABC): raise NotImplementedError("Memo size of %s" % cache_size_limit) ParserElement._left_recursion_enabled = True - @staticmethod def enable_packrat(cache_size_limit=128, *, force=False): """ @@ -4102,9 +4115,7 @@ class NotAny(ParseElementEnhance): def __init__(self, expr): super().__init__(expr) # self.leave_whitespace() - self.skipWhitespace = ( - False # do NOT use self.leave_whitespace(), don't want to propagate to exprs - ) + self.skipWhitespace = False # do NOT use self.leave_whitespace(), don't want to propagate to exprs self.mayReturnEmpty = True self.errmsg = "Found unwanted token, " + str(self.expr) diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index f72114b..da451d5 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -983,4 +983,4 @@ restOfLine = rest_of_line dblSlashComment = dbl_slash_comment cppStyleComment = cpp_style_comment javaStyleComment = java_style_comment -pythonStyleComment = python_style_comment
\ No newline at end of file +pythonStyleComment = python_style_comment |