From fa0ace0b0377ce5ec7042ea107b4019d88d27801 Mon Sep 17 00:00:00 2001 From: Antoine Gaudron-desjardins <antoine.gaudrondesjardins@student-cs.fr> Date: Thu, 13 Oct 2022 14:15:28 +0200 Subject: [PATCH] fix lint --- calculator/operators.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calculator/operators.py b/calculator/operators.py index 5b643ab..3766bdd 100644 --- a/calculator/operators.py +++ b/calculator/operators.py @@ -1,10 +1,13 @@ """ Operator module contains the Operator class and a list of standard operators. """ + + class Operator: """ Operator class is a binary operator with a symbol, a precedence and an evaluation function. """ + def __init__(self, symbol, precedence, evaluate_function): self.symbol = symbol self.precedence = precedence @@ -17,4 +20,5 @@ class Operator: 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)} -- GitLab