Skip to content

Commit

Permalink
in case of datatytpe is none, then go to string compare
Browse files Browse the repository at this point in the history
  • Loading branch information
dengzq1234 committed Aug 29, 2024
1 parent 84f4592 commit 46de27b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions treeprofiler/layouts/staple_layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,8 @@ def set_node_style(self, node):
node.add_face(identF, column = self.column, position = 'aligned', collapsed_only=True)

elif node.props.get(self.internal_prop):
<<<<<<< HEAD
heatmap_num = float(node.props.get(self.internal_prop))
=======
heatmap_num = node.props.get(self.internal_prop)
heatmap_num = float(heatmap_num)
>>>>>>> 3f3536686337b50ea7847ec6c92a47b48e04ba2f
# heatmap
tooltip = ""
if node.name:
Expand Down
3 changes: 1 addition & 2 deletions treeprofiler/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def counter_call(node, internal_prop, leaf_prop, datatype, operator_string, righ

def call(node, prop, datatype, operator_string, right_value):
num_operators = [ '<', '<=', '>', '>=' ]
if datatype == str:
if datatype == str or datatype is None:
if operator_string in num_operators:
return False
elif operator_string == 'contains':
Expand All @@ -107,7 +107,6 @@ def call(node, prop, datatype, operator_string, right_value):
return left_value in right_value
else:
left_value = node.props.get(prop)

if left_value:
return operator_dict[operator_string](left_value, right_value)

Expand Down

0 comments on commit 46de27b

Please sign in to comment.