Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
7f237bf1
Commit
7f237bf1
authored
Dec 24, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied pep8 recommendations on all source files.
parent
c3c37b5d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
4 deletions
+3
-4
main.py
main.py
+2
-1
src/node.py
src/node.py
+0
-1
tests/test_calc.py
tests/test_calc.py
+1
-1
tests/test_rules_poly.py
tests/test_rules_poly.py
+0
-1
No files found.
main.py
View file @
7f237bf1
#!/usr/bin/python
#!/usr/bin/python
def
init_readline
():
def
init_readline
():
import
os
import
os
try
:
try
:
...
@@ -17,8 +18,8 @@ def init_readline():
...
@@ -17,8 +18,8 @@ def init_readline():
import
atexit
import
atexit
atexit
.
register
(
readline
.
write_history_file
,
histfile
)
atexit
.
register
(
readline
.
write_history_file
,
histfile
)
from
src.parser
import
main
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
from
src.parser
import
main
init_readline
()
init_readline
()
main
()
main
()
src/node.py
View file @
7f237bf1
...
@@ -91,7 +91,6 @@ class ExpressionBase(object):
...
@@ -91,7 +91,6 @@ class ExpressionBase(object):
return
s_root
<
o_root
or
s_exp
<
o_exp
or
s_coeff
<
o_coeff
return
s_root
<
o_root
or
s_exp
<
o_exp
or
s_coeff
<
o_coeff
def
is_leaf
(
self
):
def
is_leaf
(
self
):
return
self
.
type
!=
TYPE_OPERATOR
return
self
.
type
!=
TYPE_OPERATOR
...
...
tests/test_calc.py
View file @
7f237bf1
tests/test_rules_poly.py
View file @
7f237bf1
...
@@ -65,7 +65,6 @@ class TestRulesPoly(unittest.TestCase):
...
@@ -65,7 +65,6 @@ class TestRulesPoly(unittest.TestCase):
[
P
(
root
,
combine_polynomes
,
((
a1
,
(
l1
,
a1
[
0
],
l2
)),
[
P
(
root
,
combine_polynomes
,
((
a1
,
(
l1
,
a1
[
0
],
l2
)),
(
a2
,
(
l1
,
a2
[
0
],
l2
))))])
(
a2
,
(
l1
,
a2
[
0
],
l2
))))])
def
test_basic_subexpressions
(
self
):
def
test_basic_subexpressions
(
self
):
a_b
,
c
,
d
,
l1
,
l5
,
l7
=
tree
(
'a+b,c,d,1,5,7'
)
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'
)
left
,
right
=
root
=
tree
(
'(a+b)^d + (a+b)^d'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment