forked from MRChemSoft/mrchem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d446f8
commit 492ac6c
Showing
12 changed files
with
6,802 additions
and
804 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ | |
:class:`'|'<MatchFirst>`, :class:`'^'<Or>` and :class:`'&'<Each>` operators. | ||
The :class:`ParseResults` object returned from | ||
:class:`ParserElement.parseString` can be | ||
:class:`ParserElement.parse_string` can be | ||
accessed as a nested list, a dictionary, or an object with named | ||
attributes. | ||
|
@@ -85,11 +85,11 @@ | |
and :class:`'&'<Each>` operators to combine simple expressions into | ||
more complex ones | ||
- associate names with your parsed results using | ||
:class:`ParserElement.setResultsName` | ||
:class:`ParserElement.set_results_name` | ||
- access the parsed data, which is returned as a :class:`ParseResults` | ||
object | ||
- find some helpful expression short-cuts like :class:`delimitedList` | ||
and :class:`oneOf` | ||
- find some helpful expression short-cuts like :class:`DelimitedList` | ||
and :class:`one_of` | ||
- find more useful common expressions in the :class:`pyparsing_common` | ||
namespace class | ||
""" | ||
|
@@ -106,30 +106,22 @@ class version_info(NamedTuple): | |
@property | ||
def __version__(self): | ||
return ( | ||
"{}.{}.{}".format(self.major, self.minor, self.micro) | ||
f"{self.major}.{self.minor}.{self.micro}" | ||
+ ( | ||
"{}{}{}".format( | ||
"r" if self.releaselevel[0] == "c" else "", | ||
self.releaselevel[0], | ||
self.serial, | ||
), | ||
f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", | ||
"", | ||
)[self.releaselevel == "final"] | ||
) | ||
|
||
def __str__(self): | ||
return "{} {} / {}".format(__name__, self.__version__, __version_time__) | ||
return f"{__name__} {self.__version__} / {__version_time__}" | ||
|
||
def __repr__(self): | ||
return "{}.{}({})".format( | ||
__name__, | ||
type(self).__name__, | ||
", ".join("{}={!r}".format(*nv) for nv in zip(self._fields, self)), | ||
) | ||
return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" | ||
|
||
|
||
__version_info__ = version_info(3, 0, 9, "final", 0) | ||
__version_time__ = "05 May 2022 07:02 UTC" | ||
__version_info__ = version_info(3, 1, 1, "final", 1) | ||
__version_time__ = "29 Jul 2023 22:27 UTC" | ||
__version__ = __version_info__.__version__ | ||
__versionTime__ = __version_time__ | ||
__author__ = "Paul McGuire <[email protected]>" | ||
|
@@ -139,9 +131,9 @@ def __repr__(self): | |
from .actions import * | ||
from .core import __diag__, __compat__ | ||
from .results import * | ||
from .core import * | ||
from .core import * # type: ignore[misc, assignment] | ||
from .core import _builtin_exprs as core_builtin_exprs | ||
from .helpers import * | ||
from .helpers import * # type: ignore[misc, assignment] | ||
from .helpers import _builtin_exprs as helper_builtin_exprs | ||
|
||
from .unicode import unicode_set, UnicodeRangeList, pyparsing_unicode as unicode | ||
|
@@ -153,11 +145,11 @@ def __repr__(self): | |
|
||
# define backward compat synonyms | ||
if "pyparsing_unicode" not in globals(): | ||
pyparsing_unicode = unicode | ||
pyparsing_unicode = unicode # type: ignore[misc] | ||
if "pyparsing_common" not in globals(): | ||
pyparsing_common = common | ||
pyparsing_common = common # type: ignore[misc] | ||
if "pyparsing_test" not in globals(): | ||
pyparsing_test = testing | ||
pyparsing_test = testing # type: ignore[misc] | ||
|
||
core_builtin_exprs += common_builtin_exprs + helper_builtin_exprs | ||
|
||
|
@@ -174,7 +166,9 @@ def __repr__(self): | |
"CaselessKeyword", | ||
"CaselessLiteral", | ||
"CharsNotIn", | ||
"CloseMatch", | ||
"Combine", | ||
"DelimitedList", | ||
"Dict", | ||
"Each", | ||
"Empty", | ||
|
@@ -227,9 +221,11 @@ def __repr__(self): | |
"alphas8bit", | ||
"any_close_tag", | ||
"any_open_tag", | ||
"autoname_elements", | ||
"c_style_comment", | ||
"col", | ||
"common_html_entity", | ||
"condition_as_parse_action", | ||
"counted_array", | ||
"cpp_style_comment", | ||
"dbl_quoted_string", | ||
|
@@ -241,6 +237,7 @@ def __repr__(self): | |
"html_comment", | ||
"identchars", | ||
"identbodychars", | ||
"infix_notation", | ||
"java_style_comment", | ||
"line", | ||
"line_end", | ||
|
@@ -255,8 +252,12 @@ def __repr__(self): | |
"null_debug_action", | ||
"nums", | ||
"one_of", | ||
"original_text_for", | ||
"printables", | ||
"punc8bit", | ||
"pyparsing_common", | ||
"pyparsing_test", | ||
"pyparsing_unicode", | ||
"python_style_comment", | ||
"quoted_string", | ||
"remove_quotes", | ||
|
@@ -267,38 +268,33 @@ def __repr__(self): | |
"srange", | ||
"string_end", | ||
"string_start", | ||
"token_map", | ||
"trace_parse_action", | ||
"ungroup", | ||
"unicode_set", | ||
"unicode_string", | ||
"with_attribute", | ||
"indentedBlock", | ||
"original_text_for", | ||
"ungroup", | ||
"infix_notation", | ||
"locatedExpr", | ||
"with_class", | ||
"CloseMatch", | ||
"token_map", | ||
"pyparsing_common", | ||
"pyparsing_unicode", | ||
"unicode_set", | ||
"condition_as_parse_action", | ||
"pyparsing_test", | ||
# pre-PEP8 compatibility names | ||
"__versionTime__", | ||
"anyCloseTag", | ||
"anyOpenTag", | ||
"cStyleComment", | ||
"commonHTMLEntity", | ||
"conditionAsParseAction", | ||
"countedArray", | ||
"cppStyleComment", | ||
"dblQuotedString", | ||
"dblSlashComment", | ||
"delimitedList", | ||
"dictOf", | ||
"htmlComment", | ||
"indentedBlock", | ||
"infixNotation", | ||
"javaStyleComment", | ||
"lineEnd", | ||
"lineStart", | ||
"locatedExpr", | ||
"makeHTMLTags", | ||
"makeXMLTags", | ||
"matchOnlyAtCol", | ||
|
@@ -308,6 +304,7 @@ def __repr__(self): | |
"nullDebugAction", | ||
"oneOf", | ||
"opAssoc", | ||
"originalTextFor", | ||
"pythonStyleComment", | ||
"quotedString", | ||
"removeQuotes", | ||
|
@@ -317,15 +314,12 @@ def __repr__(self): | |
"sglQuotedString", | ||
"stringEnd", | ||
"stringStart", | ||
"tokenMap", | ||
"traceParseAction", | ||
"unicodeString", | ||
"withAttribute", | ||
"indentedBlock", | ||
"originalTextFor", | ||
"infixNotation", | ||
"locatedExpr", | ||
"withClass", | ||
"tokenMap", | ||
"conditionAsParseAction", | ||
"autoname_elements", | ||
"common", | ||
"unicode", | ||
"testing", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.