8
8
from pathlib import Path
9
9
from tempfile import TemporaryDirectory
10
10
from traceback import format_exception
11
- from typing import Any , Iterable , Literal , TypeVar , Self
11
+ from typing import Any , Iterable , Literal , LiteralString , TypeVar , Self
12
12
13
13
from pydantic import BaseConfig , BaseModel as PydandticBaseModel , Extra , ValidationError as PydanticValidationError
14
14
@@ -187,7 +187,7 @@ def flat_intersperse(iterable: Iterable[Iterable[T]], element: T) -> Iterable[T]
187
187
class AlgobattleBaseException (Exception ):
188
188
"""Base exception class for errors used by the algobattle package."""
189
189
190
- def __init__ (self , message : str , * , detail : str | None = None ) -> None :
190
+ def __init__ (self , message : LiteralString , * , detail : str | None = None ) -> None :
191
191
"""Base exception class for errors used by the algobattle package.
192
192
193
193
Args:
@@ -214,7 +214,7 @@ class BuildError(AlgobattleBaseException):
214
214
class ExecutionError (AlgobattleBaseException ):
215
215
"""Indicates that the program could not be executed successfully."""
216
216
217
- def __init__ (self , message : str , * , detail : str | None = None , runtime : float ) -> None :
217
+ def __init__ (self , message : LiteralString , * , detail : str | None = None , runtime : float ) -> None :
218
218
"""Indicates that the program could not be executed successfully.
219
219
220
220
Args:
0 commit comments