summaryrefslogtreecommitdiff
path: root/pyparsing/core.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2022-06-16 02:16:49 -0500
committerptmcg <ptmcg@austin.rr.com>2022-06-16 02:16:49 -0500
commit24f3904616c8aad14750383632e3bfc8234edac5 (patch)
tree8206b39baf64536719ddd64a46e8202fca750951 /pyparsing/core.py
parent966d6fded149c6c11993746b0d72166bc04e4504 (diff)
downloadpyparsing-git-24f3904616c8aad14750383632e3bfc8234edac5.tar.gz
Fix up docstrings for deprecated functions (doc as deprecated, instead of duplicating actual function doc) - issue #411
Diffstat (limited to 'pyparsing/core.py')
-rw-r--r--pyparsing/core.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py
index 2506428..861548b 100644
--- a/pyparsing/core.py
+++ b/pyparsing/core.py
@@ -45,6 +45,7 @@ from .exceptions import *
from .actions import *
from .results import ParseResults, _ParseResultsWithOffset
from .unicode import pyparsing_unicode
+from .util import replaces_prePEP8_function
_MAX_INT = sys.maxsize
str_type: Tuple[type, ...] = (str, bytes)
@@ -322,6 +323,7 @@ def _trim_arity(func, max_limit=3):
return wrapper
+@replaces_prePEP8_function("conditionAsParseAction")
def condition_as_parse_action(
fn: ParseCondition, message: str = None, fatal: bool = False
) -> ParseAction:
@@ -5717,6 +5719,7 @@ def srange(s: str) -> str:
return ""
+@replaces_prePEP8_function("tokenMap")
def token_map(func, *args) -> ParseAction:
"""Helper to define a parse action by mapping a function to all
elements of a :class:`ParseResults` list. If any additional args are passed,
@@ -5799,8 +5802,6 @@ _builtin_exprs: List[ParserElement] = [
]
# backward compatibility names
-tokenMap = token_map
-conditionAsParseAction = condition_as_parse_action
nullDebugAction = null_debug_action
sglQuotedString = sgl_quoted_string
dblQuotedString = dbl_quoted_string