From eec971d87a615c7d284f6186947bd610a18af816 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Mon, 16 Aug 2021 23:52:13 -0400 Subject: [PATCH] Draft: Fix LGTM 'test for equality' warning (#4969) * Draft: Fix LGTM 'test for equality' warning ref: https://lgtm.com/projects/g/FreeCAD/FreeCAD/alerts/?mode=tree&ruleFocus=7900090 * FEM: source comment typo fixes --- src/Mod/Draft/draftutils/units.py | 2 +- src/Mod/Fem/femexamples/truss_3d_cs_circle_ele_seg3.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/draftutils/units.py b/src/Mod/Draft/draftutils/units.py index 71dbcdbaa3..df5bb657da 100644 --- a/src/Mod/Draft/draftutils/units.py +++ b/src/Mod/Draft/draftutils/units.py @@ -95,7 +95,7 @@ def display_external(internal_value, if dim == 'Length': q = App.Units.Quantity(internal_value, App.Units.Length) if not unit: - if decimals == None and showUnit: + if decimals is None and showUnit: return q.UserString conversion = q.getUserPreferred()[1] diff --git a/src/Mod/Fem/femexamples/truss_3d_cs_circle_ele_seg3.py b/src/Mod/Fem/femexamples/truss_3d_cs_circle_ele_seg3.py index d123da7f72..9763ab6b99 100644 --- a/src/Mod/Fem/femexamples/truss_3d_cs_circle_ele_seg3.py +++ b/src/Mod/Fem/femexamples/truss_3d_cs_circle_ele_seg3.py @@ -64,7 +64,7 @@ https://forum.freecadweb.org/viewtopic.php?f=13&t=59239&start=100#p521220 Z88 official example 2, crane beam - nonsway (on x deformation on both support) -- in pratical engineering one would let the truss breathe on one side +- in practical engineering one would let the truss breathe on one side - max deflection CalxuliX: 8.22 mm # but it needs four seg3 elements foreach bar - max deflection Mystran : x.xx mm - max deflection Z88 : 8.19 mm # one seg2 truss element foreach bar @@ -93,7 +93,7 @@ def setup(doc=None, solvertype="ccxtools"): if FreeCAD.GuiUp: load_line.ViewObject.hide() - # commands where generated by Pyhon out of the original Z88 Mesh obj data + # commands where generated by Python out of the original Z88 Mesh obj data v1 = vec(0.0, 2000.0, 0.0) v2 = vec(0.0, 0.0, 0.0) v3 = vec(1000.0, 1000.0, 2000.0)