Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Additional docstring and sphinx cleanup | ptmcg | 2022-06-18 | 3 | -9/+21 | |
| | ||||||
* | Replace OrderedDict in FIFOCache with dict+key ringbuffer | ptmcg | 2022-06-18 | 1 | -3/+8 | |
| | ||||||
* | More docstring fixes | ptmcg | 2022-06-17 | 1 | -4/+7 | |
| | ||||||
* | There will be black | ptmcg | 2022-06-17 | 2 | -3/+1 | |
| | ||||||
* | Explicitly declare compatibility alias functions (#414) | Devin J. Pohly | 2022-06-17 | 4 | -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 functions | ptmcg | 2022-06-17 | 1 | -2/+2 | |
| | ||||||
* | Fix docstring synonyms for parseString, scanString, et al.; refactor ↵ | ptmcg | 2022-06-17 | 2 | -18/+44 | |
| | | | | replaces_prePEP8_function decorator to handle new methods correctly | |||||
* | Add mypy ignore directives for intentional Python rule-bending | ptmcg | 2022-06-16 | 2 | -11/+14 | |
| | ||||||
* | Cleanup docstrings using replaces_prePEP8_function decorator; and black | ptmcg | 2022-06-16 | 2 | -31/+36 | |
| | ||||||
* | Use Literal.__new__ to select optimized subclasses (#413) | Devin J. Pohly | 2022-06-16 | 1 | -19/+37 | |
| | | | | | | | | | | | | | | | | | | | * 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 names | ptmcg | 2022-06-16 | 1 | -1/+1 | |
| | ||||||
* | Clean up docstrings to use new PEP8 names instead of old camelCase names | ptmcg | 2022-06-16 | 3 | -18/+18 | |
| | ||||||
* | More docstring fixup, in exceptions.py - issue #411 | ptmcg | 2022-06-16 | 1 | -3/+2 | |
| | ||||||
* | Fix up docstrings for deprecated functions (doc as deprecated, instead of ↵ | ptmcg | 2022-06-16 | 6 | -56/+97 | |
| | | | | duplicating actual function doc) - issue #411 | |||||
* | fix Sphinx errors/warnings (#410) | Devin J. Pohly | 2022-06-10 | 3 | -8/+12 | |
| | | | | | | 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 ↵ | ptmcg | 2022-06-10 | 2 | -23/+33 | |
| | | | | that min <= max if both given | |||||
* | Clean up unicode set naming to remove # type: ignore directives | ptmcg | 2022-06-08 | 1 | -23/+22 | |
| | ||||||
* | Fix list formatting in docstrings (#407) | Devin J. Pohly | 2022-06-07 | 1 | -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 | |||||
* | Convert most str.format() calls to use f-strings | ptmcg | 2022-05-30 | 8 | -194/+103 | |
| | ||||||
* | More added type annotations; reworked Word.__init__ so that excludeChars ↵ | ptmcg | 2022-05-29 | 4 | -54/+66 | |
| | | | | exclusion code is clearer | |||||
* | Fix/ignore mypy attr-defined errors, where attr definitions are intentional | ptmcg | 2022-05-29 | 4 | -19/+22 | |
| | ||||||
* | Fix type annotations of Forward dunder-methods (#402) | Stephen Rosen | 2022-05-29 | 1 | -3/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 changes | ptmcg | 2022-05-20 | 1 | -0/+5 | |
| | ||||||
* | Add embed argument to create_diagram, to suppress DOCTYPE, HEAD, and BODY tags | ptmcg | 2022-05-20 | 2 | -5/+14 | |
| | ||||||
* | Make expr[:ender] equivalent to expr[...:ender] | ptmcg | 2022-05-18 | 1 | -2/+4 | |
| | ||||||
* | Add support for slice in expr[] notation, to pass stop_on repetition sentinel | ptmcg | 2022-05-18 | 2 | -1/+21 | |
| | ||||||
* | Fixed bug in srange (escaped chars inside range set); fixed ignore type ↵ | ptmcg | 2022-05-14 | 2 | -6/+6 | |
| | | | | annotation in SkipTo | |||||
* | Prep for 3.0.9 release | ptmcg | 2022-05-05 | 1 | -1/+1 | |
| | ||||||
* | Embedded jinja2 template code in railroad code to remove use of deprecated ↵ | ptmcg | 2022-04-30 | 2 | -29/+30 | |
| | | | | pkg_resources package (issue #391) | |||||
* | Expanded BMP name to BasicMultilingualPlane (but retained BMP as a valid ↵ | ptmcg | 2022-04-30 | 2 | -2/+4 | |
| | | | | synonym) | |||||
* | Added BMP unicode_set for the Unicode Basic Multilingual Plane (issue #392) | ptmcg | 2022-04-28 | 1 | -5/+23 | |
| | ||||||
* | Fixed typo in template.jinja2 (for railroad diagrams) - fixes #388) | ptmcg | 2022-04-22 | 2 | -2/+2 | |
| | ||||||
* | Update docstrings, replacing ZeroOrMore and OneOrMore with [...] and [1, ↵ | ptmcg | 2022-04-11 | 4 | -27/+27 | |
| | | | | ...] notation | |||||
* | Reworked mypy typing, removed definitions of OptionalType, DictType, and ↵ | ptmcg | 2022-04-11 | 5 | -72/+83 | |
| | | | | IterableType | |||||
* | Don't import Optional from typing, import the whole module. (#386) | Dominic Davis-Foster | 2022-04-11 | 1 | -2/+2 | |
| | | | Addresses mypy confusion of pyparsing Optional and typing.Optional | |||||
* | Added show_groups arg to create_diagram; prep for releasepyparsing_3.0.8 | ptmcg | 2022-04-09 | 3 | -3/+19 | |
| | ||||||
* | No longer use undocumented module "sre_constants" (#379) | Serhiy Storchaka | 2022-03-29 | 2 | -5/+4 | |
| | | | Closes #378. | |||||
* | Fix issue #361 | ptmcg | 2022-03-29 | 2 | -3/+7 | |
| | ||||||
* | Add tests and updated docs for changes to lpar and rpar args to ↵ | ptmcg | 2022-03-27 | 1 | -1/+1 | |
| | | | | infix_notation; add grouping of non-suppressed tokens with grouped contents | |||||
* | Add tests and updated docs for changes to lpar and rpar args to ↵ | ptmcg | 2022-03-24 | 3 | -8/+19 | |
| | | | | infix_notation; add grouping of non-suppressed tokens with grouped contents | |||||
* | Fix bug #375 (#376) | Philippe PRADOS | 2022-03-24 | 1 | -2/+4 | |
| | ||||||
* | Add guard inside _trim_arity to protect against black reformatting in ↵ | ptmcg | 2022-03-21 | 2 | -10/+7 | |
| | | | | spacing-critical code | |||||
* | Add missing type hints (#371) | Kazantcev Andrey | 2022-03-20 | 1 | -17/+17 | |
| | | | | | * Add missing type hints * Yet another fixes | |||||
* | Black and pre-commit fixes | ptmcg | 2022-02-15 | 1 | -8/+11 | |
| | ||||||
* | Clean up dump() examples in docstrings | ptmcg | 2022-02-15 | 3 | -29/+29 | |
| | ||||||
* | Updated version number for development; blackening; some timestamp cleanup | ptmcg | 2022-02-15 | 3 | -5/+10 | |
| | ||||||
* | Mark `pyparsing` as a typed package (#364) | Bas van Beek | 2022-02-14 | 1 | -0/+0 | |
| | | | Thanks for adding this. The typing ecosystem is still pretty dynamic. | |||||
* | Update CHANGES and timestamp from #362; fix related unit test and ValueError ↵ | Paul McGuire | 2022-02-05 | 2 | -4/+3 | |
| | | | | message | |||||
* | Update CHANGES and timestamp from #362 | Paul McGuire | 2022-02-05 | 1 | -1/+1 | |
| | ||||||
* | optimize pyparsing import time by deferring regex compile (#363) | Anthony Sottile | 2022-02-05 | 1 | -14/+36 | |
| |