Skip to content
Snippets Groups Projects
Commit bc8d82e0 authored by Florentin Labelle's avatar Florentin Labelle
Browse files

remove list type hints

parent 86926d42
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
This Calculator holds the logic for the calculator.
"""
from calculator.operators import Operator, STANDARD_OPERATORS
from calculator.expression import Token, Term, Expression, TermExpression, OperatorExpression
from calculator.expression import Term, Expression, TermExpression, OperatorExpression
class Calculator:
......@@ -18,7 +18,7 @@ class Calculator:
operators = STANDARD_OPERATORS
self.operators = operators
def tokenize(self, line: str) -> list[Token]:
def tokenize(self, line: str):
"""
Tokenize an expression into a list of tokens.
"""
......@@ -34,7 +34,7 @@ class Calculator:
raise ValueError(f"Invalid token {token}") from exc
return tokens
def parse(self, tokens: list[Token]) -> Expression:
def parse(self, tokens) -> Expression:
"""
Parse a list of tokens into an ordered expression.
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment