Skip to content

Commit

Permalink
Minor style changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiaanvonmeijenfeldt committed Jul 15, 2020
1 parent 8f2d34b commit b5d5b87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CAT_pack/add_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def run():

lineage = line[lineage_index].split(';')

if scores_index and not args.exclude_scores:
if scores_index is not None and not args.exclude_scores:
scores = line[scores_index].split(';')
else:
scores = None
Expand Down
2 changes: 1 addition & 1 deletion CAT_pack/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def print_variables(args, step_list=None):
'{0}'.format('\n'.join(arguments)))
give_user_feedback(message, args.log_file, args.quiet, show_time=False)

if step_list:
if step_list is not None:
message = '\nStep list: {0}'.format(step_list)
give_user_feedback(message, args.log_file, args.quiet,
show_time=False)
Expand Down
6 changes: 3 additions & 3 deletions CAT_pack/tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def import_taxids_with_multiple_offspring(


def find_lineage(taxid, taxid2parent, lineage=None):
if lineage == None:
if lineage is None:
lineage = []

lineage.append(taxid)
Expand Down Expand Up @@ -232,7 +232,7 @@ def convert_to_names(lineage, taxid2rank, taxid2name, scores=None):
name = taxid2name[taxid]
rank = taxid2rank[taxid]

if scores:
if scores is not None:
if starred:
names.append('{0}* ({1}): {2}'.format(name, rank, scores[i]))
else:
Expand Down Expand Up @@ -268,7 +268,7 @@ def convert_to_official_names(lineage, taxid2rank, taxid2name, scores=None):

name = taxid2name[taxid]

if scores:
if scores is not None:
if starred:
official_names[i] = '{0}*: {1}'.format(name, scores[index])
else:
Expand Down

0 comments on commit b5d5b87

Please sign in to comment.