From 4e2124e1d36ed14dc42170c72161142d1e8eabc1 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 25 Apr 2023 13:41:29 +0000 Subject: [PATCH] Fix misc. linting and typos Trim whitespace; move imports to separate lines, fix typos --- src/Doc/CONTRIBUTORS | 2 +- src/Doc/templates/doxy-boot.js | 4 ++-- src/Gui/NaviCube.cpp | 8 ++++---- src/Mod/TechDraw/Gui/QGIViewDimension.cpp | 2 +- src/Tools/params_utils.py | 5 +++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Doc/CONTRIBUTORS b/src/Doc/CONTRIBUTORS index 168de39b4f..c7b732646d 100644 --- a/src/Doc/CONTRIBUTORS +++ b/src/Doc/CONTRIBUTORS @@ -112,7 +112,7 @@ lordneroo looooo Lorenz Huedepohl Luc -Luke Parry +Luke Parry luzpaz (Kunda1) Manel (Quenzo) Марко Пејовић diff --git a/src/Doc/templates/doxy-boot.js b/src/Doc/templates/doxy-boot.js index e5d7e894fe..4757432d88 100644 --- a/src/Doc/templates/doxy-boot.js +++ b/src/Doc/templates/doxy-boot.js @@ -295,7 +295,7 @@ function toggleVisibility(linkObj) summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } + } return false; } function updateStripes() @@ -305,7 +305,7 @@ function updateStripes() } function toggleLevel(level) { - $('table.directory tr').each(function(){ + $('table.directory tr').each(function(){ var l = this.id.split('_').length-1; var i = $('#img'+this.id.substring(3)); var a = $('#arr'+this.id.substring(3)); diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp index 6058237990..96eafb287b 100644 --- a/src/Gui/NaviCube.cpp +++ b/src/Gui/NaviCube.cpp @@ -377,14 +377,14 @@ int imageVerticalBalance(QImage p, int sizeHint) { if (qAlpha(p.pixel(x, top))) { done = true; break; - } + } } if (done) break; } for (bottom = startRow; bottom < h; bottom++) { for (x = 0; x < p.width(); x++){ - if (qAlpha(p.pixel(x, h-1-bottom))) - return (bottom-top)/2; + if (qAlpha(p.pixel(x, h-1-bottom))) + return (bottom-top)/2; } } return 0; @@ -408,7 +408,7 @@ void NaviCubeImplementation::createCubeFaceTextures() { qreal maxFontSize = 0.; vector mains = {PickId::Front, PickId::Top, PickId::Right, PickId::Rear, PickId::Bottom, PickId::Left}; for (PickId pickId : mains) { - auto t = QString::fromUtf8(m_LabelTextures[pickId].label.c_str()); + auto t = QString::fromUtf8(m_LabelTextures[pickId].label.c_str()); QRect br = fm.boundingRect(t); float scale = (float)texSize / max(br.width(),br.height()); m_LabelTextures[pickId].fontSize = texSize * scale; diff --git a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp index 3a3371b7a1..1dd0ca7116 100644 --- a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp @@ -2566,7 +2566,7 @@ Base::Vector3d QGIViewDimension::findIsoExt(Base::Vector3d dir) const else if (dir.IsEqual(-isoZ, FLT_EPSILON)) { return -isoX; } - + //tarfu Base::Console().Message("QGIVD::findIsoExt - %s - input is not iso axis\n", getViewObject()->getNameInDocument()); diff --git a/src/Tools/params_utils.py b/src/Tools/params_utils.py index 725ec9b427..74ee71bea5 100644 --- a/src/Tools/params_utils.py +++ b/src/Tools/params_utils.py @@ -19,10 +19,11 @@ # * USA * # * * # *************************************************************************** -"""Utilites for generating C++ code for parameters management using Python Cog +"""Utilities for generating C++ code for parameter management using Python Cog """ import cog -import inspect, re +import inspect +import re from os import path