Skip to content

Commit

Permalink
is not None instead of != None
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkasirer committed Apr 23, 2024
1 parent 6fe80d8 commit 68d0131
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit 68d0131

Please sign in to comment.