Taddeus Kroes пре 14 година
родитељ
комит
709a061c39
3 измењених фајлова са 4 додато и 9 уклоњено
  1. 2 2
      src/rules/goniometry.py
  2. 2 2
      src/rules/groups.py
  3. 0 5
      src/rules/numerics.py

+ 2 - 2
src/rules/goniometry.py

@@ -1,5 +1,5 @@
-from ..node import ExpressionNode as N, ExpressionLeaf as L, Scope, \
-        OP_ADD, OP_POW, OP_MUL, OP_SIN, OP_COS, OP_TAN
+from ..node import ExpressionLeaf as L, Scope, OP_ADD, OP_POW, OP_MUL, \
+        OP_SIN, OP_COS, OP_TAN
 from ..possibilities import Possibility as P, MESSAGES
 from ..translate import _
 

+ 2 - 2
src/rules/groups.py

@@ -1,7 +1,7 @@
 from itertools import combinations
 
-from ..node import ExpressionNode as Node, ExpressionLeaf as Leaf, Scope, \
-        OP_ADD, OP_MUL, nary_node, negate
+from ..node import ExpressionLeaf as Leaf, Scope, OP_ADD, OP_MUL, nary_node, \
+        negate
 from ..possibilities import Possibility as P, MESSAGES
 from ..translate import _
 

+ 0 - 5
src/rules/numerics.py

@@ -38,11 +38,6 @@ def add_numerics(root, args):
     scope, c0, c1 = args
     value = c0.actual_value() + c1.actual_value()
 
-    if value < 0:
-        leaf = Leaf(-value).negate()
-    else:
-        leaf = Leaf(value)
-
     # Replace the left node with the new expression
     scope.replace(c0, Leaf(abs(value)).negate(int(value < 0)))