diff --git a/src/party/__init__.py b/src/pyalibert/__init__.py similarity index 100% rename from src/party/__init__.py rename to src/pyalibert/__init__.py diff --git a/src/party/forward.py b/src/pyalibert/forward.py similarity index 100% rename from src/party/forward.py rename to src/pyalibert/forward.py diff --git a/src/party/parser.py b/src/pyalibert/parser.py similarity index 100% rename from src/party/parser.py rename to src/pyalibert/parser.py diff --git a/src/party/result.py b/src/pyalibert/result.py similarity index 82% rename from src/party/result.py rename to src/pyalibert/result.py index 3149290..edf00ba 100644 --- a/src/party/result.py +++ b/src/pyalibert/result.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Union, Callable, Generic, TypeVar +from typing import Union, Generic, TypeVar P = TypeVar("P") @@ -17,7 +17,7 @@ class Failure: P = TypeVar("P") -Result = Union["Failure", "Success[P]"] +Result = Union[Failure, Success[P]] class ParseError(BaseException): @@ -32,8 +32,6 @@ class ParseError(BaseException): message = f""" Parsing failed at position {self.failure.at_index} of stream : ${fail_section} - -Expected one of: -{failure.expected} +Expected one of: {failure.expected} """ super().__init__(message)