Applied pep8 recommendations on all source files.

parent c3c37b5d
#!/usr/bin/python
def init_readline():
import os
try:
......@@ -17,8 +18,8 @@ def init_readline():
import atexit
atexit.register(readline.write_history_file, histfile)
from src.parser import main
if __name__ == '__main__':
from src.parser import main
init_readline()
main()
......@@ -91,7 +91,6 @@ class ExpressionBase(object):
return s_root < o_root or s_exp < o_exp or s_coeff < o_coeff
def is_leaf(self):
return self.type != TYPE_OPERATOR
......
......@@ -55,7 +55,7 @@ class TestCalc(unittest.TestCase):
L('c')), L('d'))),
('ab(c)d', N('*', N('*', N('*', L('a'), L('b')),
L('c')), L('d'))),
('ab*(c)*d', N('*', N('*', N('*', L('a'), L('b')),
('ab*(c)*d', N('*', N('*', N('*', L('a'), L('b')),
L('c')), L('d'))),
('ab*(c)^d', N('*', N('*', L('a'), L('b')),
N('^', L('c'), L('d')))),
......
......@@ -65,7 +65,6 @@ class TestRulesPoly(unittest.TestCase):
[P(root, combine_polynomes, ((a1, (l1, a1[0], l2)),
(a2, (l1, a2[0], l2))))])
def test_basic_subexpressions(self):
a_b, c, d, l1, l5, l7 = tree('a+b,c,d,1,5,7')
left, right = root = tree('(a+b)^d + (a+b)^d')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment