Skip to content

Commit

Permalink
Merge pull request #493 from jamesmartini/develop_py38syntax
Browse files Browse the repository at this point in the history
Explored SyntaxWarnings associated to using py38
  • Loading branch information
GavinHuttley committed Jan 16, 2020
2 parents 8ab466b + 757e0a9 commit e03b5ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cogent3/core/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ def _get_sub_tree(
for (n, v) in list(self.params.items())
if v is not None
and child.params.get(n) is not None
and n is not "length"
and n != "length"
]
length = self.length + child.length
if length:
Expand Down
2 changes: 1 addition & 1 deletion src/cogent3/util/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_rank():
rank = COMM.Get_rank()
else:
process_name = multiprocessing.current_process().name
if process_name is not "MainProcess":
if process_name != "MainProcess":
rank = int(process_name.split("-")[-1])
return rank

Expand Down
4 changes: 2 additions & 2 deletions tests/test_maths/test_stats/test_jackknife.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def pmcc(data, axis=1):
is two dimensional: [[Y1], [Y2]] (trying to determine the correlation
coefficient between data sets Y1 and Y2"""

if axis is 0:
if axis == 0:
data = data.transpose()
axis = 1

Expand Down Expand Up @@ -96,7 +96,7 @@ def test_jackknife_stats(self):
test_knife = JackknifeStats(data.shape[1], pmcc_stat)
self.assertFloatEqual(test_knife.JackknifedStat, 1.2905845)
self.assertFloatEqual(test_knife.Exception, 0.2884490)
self.assertTrue(test_knife._jackknifed_stat is not None)
self.assertTrue(test_knife._jackknifed_stat != None)

# Vector
mean_stat = stat_maker(mean, data, 1)
Expand Down

0 comments on commit e03b5ae

Please sign in to comment.