Skip to content

Commit 9548aca

Browse files
committed
Improve code style
1 parent 2ccbeef commit 9548aca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source-code/testing/Unittest/Newick/node_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
#!/usr/bin/env python
22
'''module containing various functions for working with trees and nodes'''
33

4-
from node_parser import NodeParser
54
import unittest
5+
from node_parser import NodeParser
66

77

88
def depth(node):
99
'''compute the depth of the given tree'''
1010
if node is None:
1111
return 0
12-
elif node.is_leaf():
12+
if node.is_leaf():
1313
return 1
14-
else:
15-
return 1 + max(list(map(depth, node.children())))
14+
return 1 + max(list(map(depth, node.children())))
1615

1716

1817
def depth_first_iterator(node):
@@ -131,5 +130,6 @@ def test_deep_tree(self):
131130
tree = parser.node()
132131
self.assertEqual(nr_leaf_nodes(tree), 1)
133132

133+
134134
if __name__ == '__main__':
135135
unittest.main()

0 commit comments

Comments
 (0)