diff --git a/lamb_engine/nodes/nodes.py b/lamb_engine/nodes/nodes.py index 277bf06..fb979b2 100644 --- a/lamb_engine/nodes/nodes.py +++ b/lamb_engine/nodes/nodes.py @@ -77,8 +77,8 @@ class Node: self.parent_side: Direction = None # type: ignore # Left and right nodes, None if empty - self._left: Node | None = None - self._right: Node | None = None + self._left = None + self._right = None # The runner this node is attached to. # Set by Node.set_runner() @@ -341,7 +341,7 @@ class Bound(EndNode): # The name of the macro this bound came from. # Always equal to self.name, unless the macro # this came from had a subscript. - self.macro_name: str | None = macro_name + self.macro_name = macro_name if forced_id is None: self.identifier = bound_counter @@ -381,9 +381,9 @@ class Func(Node): Func.from_parse(result) ) - def __init__(self, input: Macro | Bound, output: Node, *, runner = None) -> None: + def __init__(self, input, output: Node, *, runner = None) -> None: super().__init__() - self.input: Macro | Bound = input + self.input = input self.left: Node = output self.right: None = None self.runner = runner # type: ignore diff --git a/lamb_engine/runner/commands.py b/lamb_engine/runner/commands.py index 7f4966e..47dee34 100644 --- a/lamb_engine/runner/commands.py +++ b/lamb_engine/runner/commands.py @@ -14,7 +14,7 @@ help_texts = {} def lamb_command( *, - command_name: str | None = None, + command_name = None, help_text: str ): """ diff --git a/lamb_engine/runner/runner.py b/lamb_engine/runner/runner.py index a3944b1..69a906b 100644 --- a/lamb_engine/runner/runner.py +++ b/lamb_engine/runner/runner.py @@ -46,7 +46,7 @@ class Runner: # Maximum amount of reductions. # If None, no maximum is enforced. # Must be at least 1. - self.reduction_limit: int | None = 1_000_000 + self.reduction_limit = 1_000_000 # Ensure bound variables are unique. # This is automatically incremented whenever we make @@ -74,7 +74,7 @@ class Runner: message = self.prompt_message ) - def parse(self, line) -> tuple[lamb_engine.nodes.Root | MacroDef | Command, list]: + def parse(self, line): # -> tuple[lamb_engine.nodes.Root | MacroDef | Command, list] e = self.parser.parse_line(line) w = []