summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add new classifiers to pyproject.tomlptmcg2022-06-301-0/+3
|
* Added python_quoted_string; fixed exception messages for ParseElementEnhance ↵ptmcg2022-06-297-114/+193
| | | | subclasses
* Update test_diagram.py testing with and without embedptmcg2022-06-241-6/+6
|
* Update latest version timestampptmcg2022-06-241-1/+1
|
* Minor changes in verilogParse.py - remove unused timing vars, change ↵ptmcg2022-06-241-4/+3
| | | | time.time() to time.perf_counter()
* Update diagram tests to reflect changes in jinja2ptmcg2022-06-243-2/+4
|
* Remove assignment to __class__ in Word, remove internal _WordRegex classptmcg2022-06-243-14/+15
|
* Simplify code that incrementally builds a ParseResultsptmcg2022-06-232-5/+6
|
* Update tox.ini to run packaging tests using Python 3.7ptmcg2022-06-181-0/+1
|
* Additional docstring and sphinx cleanupptmcg2022-06-184-10/+22
|
* Replace OrderedDict in FIFOCache with dict+key ringbufferptmcg2022-06-181-3/+8
|
* More docstring fixesptmcg2022-06-171-4/+7
|
* Enable packrat in verilogParse.py by defaultptmcg2022-06-171-2/+2
|
* Add note to CHANGES about upcoming DeprecationWarnings to be emitted in next ↵ptmcg2022-06-171-0/+8
| | | | minor release
* There will be blackptmcg2022-06-172-3/+1
|
* Explicitly declare compatibility alias functions (#414)Devin J. Pohly2022-06-174-90/+203
| | | | | This allows static type checkers to find and check these functions correctly, and it removes the need to fiddle around with stack frames to get the aliases defined.
* Docstring cleanups in col and lineno functionsptmcg2022-06-171-2/+2
|
* Fix docstring synonyms for parseString, scanString, et al.; refactor ↵ptmcg2022-06-172-18/+44
| | | | replaces_prePEP8_function decorator to handle new methods correctly
* Add mypy ignore directives for intentional Python rule-bendingptmcg2022-06-162-11/+14
|
* Cleanup docstrings using replaces_prePEP8_function decorator; and blackptmcg2022-06-162-31/+36
|
* Add CHANGES blurb for Optional/Literal/Empty changes (Issue #412) (PR #413)ptmcg2022-06-161-0/+16
|
* Use Literal.__new__ to select optimized subclasses (#413)Devin J. Pohly2022-06-162-24/+47
| | | | | | | | | | | | | | | | | | | * Use Literal.__new__ to select optimized subclasses This turns Literal() into a factory which creates an object of the appropriate type from the start, rather than having to overwrite the __class__ attribute later. * Fix Literal.__copy__() Instance attributes from superclasses weren't being transferred to the copy. Regression test included. * Make Empty a subclass of Literal This unifies the logic with other optimized literal classes like _SingleCharLiteral, and it seemed right in terms of a type relationship. * Style
* Clean up docstrings to use new PEP8 names instead of old camelCase namesptmcg2022-06-161-1/+1
|
* Clean up docstrings to use new PEP8 names instead of old camelCase namesptmcg2022-06-163-18/+18
|
* More docstring fixup, in exceptions.py - issue #411ptmcg2022-06-161-3/+2
|
* Fix up docstrings for deprecated functions (doc as deprecated, instead of ↵ptmcg2022-06-167-58/+99
| | | | duplicating actual function doc) - issue #411
* Acknowledge DJPohly docstring cleanup efforts in CHANGES fileptmcg2022-06-101-0/+4
|
* fix Sphinx errors/warnings (#410)Devin J. Pohly2022-06-104-9/+15
| | | | | | Two warnings remain from the Hebrew and Devanagari names in pyparsing_unicode, but those are due to Sphinx using Python's builtin `re` library to parse identifiers (which does not have thorough Unicode handling for `\w`).
* Fix Word(max=2) (issue #409); create re for Word(exact=n) exprs; validate ↵ptmcg2022-06-104-23/+92
| | | | that min <= max if both given
* Clean up unicode set naming to remove # type: ignore directivesptmcg2022-06-081-23/+22
|
* Fix list formatting in docstrings (#407)Devin J. Pohly2022-06-071-26/+37
| | | | | | | | | * Fix list formatting in docstrings A few docstrings were missing a blank line before lists, causing the start of the list to be parsed by RST as a continuation of the previous line. * add backticks to parameter names in lists
* Updates to HowToUsePyparsing.rstptmcg2022-05-311-4/+8
|
* Updates to HowToUsePyparsing.rst, and added pyparsingClassDiagram_3.0.9.jpgptmcg2022-05-312-8/+41
|
* Convert most str.format() calls in tests to use f-stringsptmcg2022-05-302-251/+105
|
* Convert most str.format() calls to use f-stringsptmcg2022-05-308-194/+103
|
* Enable mypy-test in CI (#406)Stephen Rosen2022-05-302-9/+8
| | | | | | With the updated matrix build config, it's now possible to add a py3.10 build to run `tox -e mypy-test`. Also, fix a bug in the workflow in on.pull_request.paths
* More added type annotations; reworked Word.__init__ so that excludeChars ↵ptmcg2022-05-296-55/+92
| | | | exclusion code is clearer
* Tighten up unit test calls to parseString, to pass parseAll=True except when ↵ptmcg2022-05-291-273/+330
| | | | False is explicitly required
* Fix/ignore mypy attr-defined errors, where attr definitions are intentionalptmcg2022-05-294-19/+22
|
* Update CI to avoid `tox -e ALL` (#405)Stephen Rosen2022-05-291-15/+6
| | | | | | | | | | | | | | When this is used, it means that no new toxenv can be introduced which is incompatible with pypy. This poses an issue for work using mypy to check annotations, as pypy currently cannot install it. In order to move away from `-e ALL`, expand the github actions matrix config to generate the list of desirable runs. The TOXENV=py setting is used to run the main testenv on the current interpreter, and the TOXENV=pyparsing_packaging builds (which run today) are preserved except for on macos and pypy. The codecov step now looks for `TOXENV=py` in addition to other matrix attributes.
* Fix type annotations of Forward dunder-methods (#402)Stephen Rosen2022-05-294-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix type annotations of Forward dunder-methods The `__lshift__`, `__ilshift__`, and `__or__` methods each return a ParserElement object, but have no annotated return type. The result is that the following code will not type check: def foo() -> pp.ParserElement: expr = pp.Forward() expr <<= bar() return expr | pp.Literal("baz") whereas the code will type check if the return line is changed to return pp.MatchFirst([expr, pp.Literal("baz")]) This is a bug in the types which can be resolved fairly simply with some return type annotations. Testing is more complicated. Testing annotation accuracy is a relatively novel space with a few options, none of which can be considered standard as of yet. Many solutions require learning a new toolchain only for that purpose. However, one of the lower-impact options is to use `mypy --warn-unused-ignores` to check that annotations satisfy some constraints. This isn't the most precise test possible, but it's simple and uses a widely known and familiar tool for the job. `tox -e mypy-tests` is a new tox env which calls `mypy` in the desired way. We can confirm with a new test case file that `tox -e mypy-tests` fails prior to this change to `pyparsing/` and that it passes with the change made. * Comment out mypy-test tox env for CI Until CI adjustments are made, it's not possible to add mypy-test to the tox config. It will be run under pypy where it does not work until other changes are made.
* Cleaned up/expanded some docstrings and docs to reflect new 3.0.10 changesptmcg2022-05-203-3/+24
|
* Add embed argument to create_diagram, to suppress DOCTYPE, HEAD, and BODY tagsptmcg2022-05-206-5/+195
|
* Make expr[:ender] equivalent to expr[...:ender]ptmcg2022-05-183-13/+54
|
* Add support for slice in expr[] notation, to pass stop_on repetition sentinelptmcg2022-05-184-12/+48
|
* Fixed some reStructured text errors in whats_new_in_3_0_0.rstptmcg2022-05-141-3/+3
|
* Updated version headers in CHANGES to include release datesptmcg2022-05-141-24/+24
|
* Fixed bug in srange (escaped chars inside range set); fixed ignore type ↵ptmcg2022-05-146-13/+40
| | | | annotation in SkipTo
* Back out Lox language parser (from Crafting Interpreters, by Robert Nystrom)pyparsing_3.0.9ptmcg2022-05-101-220/+0
|
* Added Lox language parser (from Crafting Interpreters, by Robert Nystrom)ptmcg2022-05-082-2911/+220
|