parsita
Advanced tools
+1
-1
| Metadata-Version: 2.1 | ||
| Name: parsita | ||
| Version: 2.2.0 | ||
| Version: 2.2.1 | ||
| Summary: Parser combinator library for Python | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/drhagen/parsita |
+5
-4
| [tool.poetry] | ||
| name = "parsita" | ||
| version = "2.2.0" | ||
| version = "2.2.1" | ||
| description = "Parser combinator library for Python" | ||
@@ -32,3 +32,3 @@ authors = ["David Hagen <david@drhagen.com>"] | ||
| # Lint | ||
| ruff = "^0.6" | ||
| ruff = "^0.8" | ||
@@ -87,2 +87,3 @@ # Type checking | ||
| extend-ignore = ["F821", "N805"] | ||
| isort.combine-as-imports = true | ||
@@ -96,7 +97,7 @@ [tool.ruff.lint.per-file-ignores] | ||
| strict = true | ||
| implicit_reexport = true | ||
| # name-defined; Parsita triggers this, but code coverage will catch it | ||
| disable_error_code = ["name-defined"] | ||
| [build-system] | ||
| requires = ["poetry-core>=1.0.0"] | ||
| build-backend = "poetry.core.masonry.api" |
+31
-26
@@ -1,30 +0,35 @@ | ||
| from .metaclasses import ParserContext, fwd | ||
| # Use `as` to mark names as re-exports from submodules for mypy. | ||
| # Remove this from all re-exports whenever mypy supports a less verbose solution | ||
| # (https://github.com/python/mypy/issues/10198) | ||
| # or Ruff adds adds an equivalent lint | ||
| # (https://github.com/astral-sh/ruff/issues/13507) | ||
| from .metaclasses import ParserContext as ParserContext, fwd as fwd | ||
| from .parsers import ( | ||
| Parser, | ||
| any1, | ||
| debug, | ||
| eof, | ||
| failure, | ||
| first, | ||
| lit, | ||
| longest, | ||
| opt, | ||
| pred, | ||
| reg, | ||
| rep, | ||
| rep1, | ||
| rep1sep, | ||
| repsep, | ||
| success, | ||
| until, | ||
| Parser as Parser, | ||
| any1 as any1, | ||
| debug as debug, | ||
| eof as eof, | ||
| failure as failure, | ||
| first as first, | ||
| lit as lit, | ||
| longest as longest, | ||
| opt as opt, | ||
| pred as pred, | ||
| reg as reg, | ||
| rep as rep, | ||
| rep1 as rep1, | ||
| rep1sep as rep1sep, | ||
| repsep as repsep, | ||
| success as success, | ||
| until as until, | ||
| ) | ||
| from .state import ( | ||
| Failure, | ||
| ParseError, | ||
| Reader, | ||
| RecursionError, | ||
| Result, | ||
| SequenceReader, | ||
| StringReader, | ||
| Success, | ||
| Failure as Failure, | ||
| ParseError as ParseError, | ||
| Reader as Reader, | ||
| RecursionError as RecursionError, | ||
| Result as Result, | ||
| SequenceReader as SequenceReader, | ||
| StringReader as StringReader, | ||
| Success as Success, | ||
| ) |
| from __future__ import annotations | ||
| __all__ = ["ForwardDeclaration", "fwd", "ParserContext"] | ||
| __all__ = ["ForwardDeclaration", "ParserContext", "fwd"] | ||
@@ -5,0 +5,0 @@ import builtins |
@@ -1,20 +0,43 @@ | ||
| from ._alternative import FirstAlternativeParser, LongestAlternativeParser, first, longest | ||
| from ._any import AnyParser, any1 | ||
| from ._base import Parser, wrap_literal | ||
| from ._conversion import ConversionParser, TransformationParser | ||
| from ._debug import DebugParser, debug | ||
| from ._end_of_source import EndOfSourceParser, eof | ||
| from ._literal import LiteralParser, lit | ||
| from ._optional import OptionalParser, opt | ||
| from ._predicate import PredicateParser, pred | ||
| from ._regex import RegexParser, reg | ||
| from ._repeated import RepeatedOnceParser, RepeatedParser, rep, rep1 | ||
| # Use `as` to mark names as re-exports from submodules for mypy. | ||
| from ._alternative import ( | ||
| FirstAlternativeParser as FirstAlternativeParser, | ||
| LongestAlternativeParser as LongestAlternativeParser, | ||
| first as first, | ||
| longest as longest, | ||
| ) | ||
| from ._any import AnyParser as AnyParser, any1 as any1 | ||
| from ._base import Parser as Parser, wrap_literal as wrap_literal | ||
| from ._conversion import ( | ||
| ConversionParser as ConversionParser, | ||
| TransformationParser as TransformationParser, | ||
| ) | ||
| from ._debug import DebugParser as DebugParser, debug as debug | ||
| from ._end_of_source import EndOfSourceParser as EndOfSourceParser, eof as eof | ||
| from ._literal import LiteralParser as LiteralParser, lit as lit | ||
| from ._optional import OptionalParser as OptionalParser, opt as opt | ||
| from ._predicate import PredicateParser as PredicateParser, pred as pred | ||
| from ._regex import RegexParser as RegexParser, reg as reg | ||
| from ._repeated import ( | ||
| RepeatedOnceParser as RepeatedOnceParser, | ||
| RepeatedParser as RepeatedParser, | ||
| rep as rep, | ||
| rep1 as rep1, | ||
| ) | ||
| from ._repeated_seperated import ( | ||
| RepeatedOnceSeparatedParser, | ||
| RepeatedSeparatedParser, | ||
| rep1sep, | ||
| repsep, | ||
| RepeatedOnceSeparatedParser as RepeatedOnceSeparatedParser, | ||
| RepeatedSeparatedParser as RepeatedSeparatedParser, | ||
| rep1sep as rep1sep, | ||
| repsep as repsep, | ||
| ) | ||
| from ._sequential import DiscardLeftParser, DiscardRightParser, SequentialParser | ||
| from ._success import FailureParser, SuccessParser, failure, success | ||
| from ._until import UntilParser, until | ||
| from ._sequential import ( | ||
| DiscardLeftParser as DiscardLeftParser, | ||
| DiscardRightParser as DiscardRightParser, | ||
| SequentialParser as SequentialParser, | ||
| ) | ||
| from ._success import ( | ||
| FailureParser as FailureParser, | ||
| SuccessParser as SuccessParser, | ||
| failure as failure, | ||
| success as success, | ||
| ) | ||
| from ._until import UntilParser as UntilParser, until as until |
@@ -1,2 +0,2 @@ | ||
| __all__ = ["FirstAlternativeParser", "first", "LongestAlternativeParser", "longest"] | ||
| __all__ = ["FirstAlternativeParser", "LongestAlternativeParser", "first", "longest"] | ||
@@ -3,0 +3,0 @@ from typing import Generic, Optional, Sequence, Union, overload |
@@ -1,2 +0,2 @@ | ||
| __all__ = ["RepeatedSeparatedParser", "repsep", "RepeatedOnceSeparatedParser", "rep1sep"] | ||
| __all__ = ["RepeatedOnceSeparatedParser", "RepeatedSeparatedParser", "rep1sep", "repsep"] | ||
@@ -3,0 +3,0 @@ from typing import Generic, Optional, Sequence, Union, overload |
@@ -1,2 +0,2 @@ | ||
| __all__ = ["RepeatedOnceParser", "rep1", "RepeatedParser", "rep"] | ||
| __all__ = ["RepeatedOnceParser", "RepeatedParser", "rep", "rep1"] | ||
@@ -3,0 +3,0 @@ from typing import Generic, Optional, Sequence, Union, overload |
@@ -1,2 +0,2 @@ | ||
| __all__ = ["SequentialParser", "DiscardLeftParser", "DiscardRightParser"] | ||
| __all__ = ["DiscardLeftParser", "DiscardRightParser", "SequentialParser"] | ||
@@ -3,0 +3,0 @@ from typing import Any, Generic, Optional, Sequence |
@@ -1,2 +0,2 @@ | ||
| __all__ = ["SuccessParser", "success", "FailureParser", "failure"] | ||
| __all__ = ["FailureParser", "SuccessParser", "failure", "success"] | ||
@@ -3,0 +3,0 @@ from typing import Generic, NoReturn, TypeVar |
@@ -1,4 +0,15 @@ | ||
| from ._exceptions import ParseError, RecursionError | ||
| from ._reader import Reader, SequenceReader, StringReader | ||
| from ._result import Failure, Result, Success | ||
| from ._state import Continue, Element, Input, Output, State | ||
| # Use `as` to mark names as re-exports from submodules for mypy. | ||
| from ._exceptions import ParseError as ParseError, RecursionError as RecursionError | ||
| from ._reader import ( | ||
| Reader as Reader, | ||
| SequenceReader as SequenceReader, | ||
| StringReader as StringReader, | ||
| ) | ||
| from ._result import Failure as Failure, Result as Result, Success as Success | ||
| from ._state import ( | ||
| Continue as Continue, | ||
| Element as Element, | ||
| Input as Input, | ||
| Output as Output, | ||
| State as State, | ||
| ) |
@@ -1,2 +0,2 @@ | ||
| __all__ = ["Result", "Success", "Failure"] | ||
| __all__ = ["Failure", "Result", "Success"] | ||
@@ -3,0 +3,0 @@ from typing import TypeVar |
| from __future__ import annotations | ||
| __all__ = ["State", "Continue", "Input", "Output", "Element"] | ||
| __all__ = ["Continue", "Element", "Input", "Output", "State"] | ||
@@ -5,0 +5,0 @@ from dataclasses import dataclass |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
81758
2.12%1629
2.45%