Skip to content
Snippets Groups Projects
Commit 4f2b711c authored by Alexandre Gravereaux's avatar Alexandre Gravereaux
Browse files

lint-correction

parent 13b520f6
Branches
No related tags found
No related merge requests found
Pipeline #53926 failed
""" """
Expression module defines the structure of an expression. Expression module defines the structure of an expression.
""" """
from calculator.operators import Operator
from typing import Union from typing import Union
from calculator.operators import Operator
Term: type = int Term: type = int
Token: type = Union[Operator, Term] Token: type = Union[Operator, Term]
......
...@@ -17,4 +17,7 @@ class Operator: ...@@ -17,4 +17,7 @@ class Operator:
return self.evaluate_function(left, right) return self.evaluate_function(left, right)
STANDARD_OPERATORS = { '+': Operator('+', 1, lambda a, b: a + b),'-': Operator('-', 1, lambda a, b: a - b),'*': Operator('×', 2, lambda a, b: a * b),'/': Operator('/', 2, lambda a, b: a / b)} STANDARD_OPERATORS = { '+': Operator('+', 1, lambda a, b: a + b),
'-': Operator('-', 1, lambda a, b: a - b),
'*': Operator('×', 2, lambda a, b: a * b),
'/': Operator('/', 2, lambda a, b: a / b)}
from calculator.calculator import Calculator
from fastapi import FastAPI from fastapi import FastAPI
from fastapi.requests import Request from fastapi.requests import Request
from fastapi.templating import Jinja2Templates from fastapi.templating import Jinja2Templates
from calculator.calculator import Calculator
app = FastAPI() app = FastAPI()
templates = Jinja2Templates(directory="calculator/templates") templates = Jinja2Templates(directory="calculator/templates")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment