Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Licini committed Nov 10, 2023
1 parent b89880a commit e1a2fe3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/compas_igs2/rhino/forms/attributesform.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def create_force_table(cls, sceneNode, dual=[]):
attributes = filter(lambda attr: attr in Allowed, attributes)

for attr in attributes:
checkbox = type(datastructure.default_edge_attributes[attr]) == bool
checkbox = type(datastructure.default_edge_attributes[attr]) is bool
attr = attr.replace("_", "-")
table.add_column(attr, Editable=False, checkbox=checkbox)

Expand Down Expand Up @@ -146,7 +146,7 @@ def create_constraint_edge_table(cls, sceneNode, dual=[]):
attributes = filter(lambda attr: attr in Allowed, attributes)

for attr in attributes:
checkbox = type(datastructure.default_edge_attributes[attr]) == bool
checkbox = type(datastructure.default_edge_attributes[attr]) is bool
attr = attr.replace("_", "-")
table.add_column(attr, Editable=False, checkbox=checkbox)

Expand Down Expand Up @@ -184,7 +184,7 @@ def create_constraint_formvertex_table(cls, sceneNode, dual=[]):

for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_vertex_attributes[attr]) == bool
checkbox = type(datastructure.default_vertex_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=False, checkbox=checkbox)
Expand Down Expand Up @@ -215,7 +215,7 @@ def create_constraint_forcevertex_table(cls, sceneNode, dual=[]):

for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_vertex_attributes[attr]) == bool
checkbox = type(datastructure.default_vertex_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=False, checkbox=checkbox)
Expand All @@ -240,7 +240,7 @@ def create_vertices_table(cls, sceneNode):
attributes = table.sort_attributes(attributes)
for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_vertex_attributes[attr]) == bool
checkbox = type(datastructure.default_vertex_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=editable, checkbox=checkbox)
Expand All @@ -266,7 +266,7 @@ def create_edges_table(cls, sceneNode):

for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_edge_attributes[attr]) == bool
checkbox = type(datastructure.default_edge_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=editable, checkbox=checkbox)
Expand Down Expand Up @@ -365,10 +365,10 @@ def on_edited(sender, event):

original_value = get_set_attributes(key, attr)

if type(original_value) == float and type(new_value) == int:
if type(original_value) is float and type(new_value) is int:
new_value = float(new_value)
if new_value != original_value:
if type(new_value) == type(original_value):
if type(new_value) is type(original_value):
print("will update key: %s, attr: %s, value: %s" % (key, attr, new_value))
self.to_update[(key, attr)] = (get_set_attributes, new_value)
else:
Expand Down

0 comments on commit e1a2fe3

Please sign in to comment.