diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/code.py b/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/code.py index 81ee31977..c6e58ce63 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/code.py +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/code.py @@ -1,10 +1,9 @@ from ghpythonlib.componentbase import executingcomponent as component from Grasshopper.Kernel.GH_RuntimeMessageLevel import Warning -import clr -import System -import inspect from System.Windows.Forms import ToolStripSeparator from System.Windows.Forms import ToolStripMenuItem + +import inspect from collections import OrderedDict from compas_timber.connections import Joint @@ -43,7 +42,7 @@ def RunScript(self, *args): kwargs = {} for i, val in enumerate(args[2:]): - if val != None: + if val is not None: kwargs[self.arg_names()[i + 2]] = val print(kwargs) if not cat_a: diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/code.py b/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/code.py index eec1438ac..30c8bcee2 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/code.py +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/code.py @@ -37,7 +37,7 @@ def RunScript(self, *args): beam_b = args[1] kwargs = {} for i, val in enumerate(args[2:]): - if val != None: + if val is not None: kwargs[self.arg_names()[i + 2]] = val if not beam_a: diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_L/code.py b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_L/code.py index 5f701497c..ef5dfe091 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_L/code.py +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_L/code.py @@ -35,7 +35,7 @@ def RunScript(self, *args): ghenv.Component.Message = self.joint_type.__name__ kwargs = {} for i, val in enumerate(args): - if val != None: + if val is not None: kwargs[self.arg_names()[i]] = val if self.joint_type.SUPPORTED_TOPOLOGY != JointTopology.TOPO_L: self.AddRuntimeMessage(Warning, "Joint type does not match topology. Joint may not be generated.") diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_T/code.py b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_T/code.py index 84f1c9827..97bd1c177 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_T/code.py +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_T/code.py @@ -35,7 +35,7 @@ def RunScript(self, *args): ghenv.Component.Message = self.joint_type.__name__ kwargs = {} for i, val in enumerate(args): - if val != None: + if val is not None: kwargs[self.arg_names()[i]] = val if self.joint_type.SUPPORTED_TOPOLOGY != JointTopology.TOPO_T: self.AddRuntimeMessage(Warning, "Joint type does not match topology. Joint may not be generated.") diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_X/code.py b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_X/code.py index 8271f5f2e..3ec154746 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_X/code.py +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology_X/code.py @@ -35,7 +35,7 @@ def RunScript(self, *args): ghenv.Component.Message = self.joint_type.__name__ kwargs = {} for i, val in enumerate(args): - if val != None: + if val is not None: kwargs[self.arg_names()[i]] = val if self.joint_type.SUPPORTED_TOPOLOGY != JointTopology.TOPO_X: self.AddRuntimeMessage(Warning, "Joint type does not match topology. Joint may not be generated.")