Skip to content
Snippets Groups Projects
Commit 9ef56762 authored by Juliette Kalflèche's avatar Juliette Kalflèche
Browse files

fix pipeline

parent 6140a496
No related branches found
No related tags found
No related merge requests found
Pipeline #46273 passed
""" """
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,6 @@ class Operator: ...@@ -17,4 +17,6 @@ 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 """hejnzk"""
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