diff --git a/src/Mod/AddonManager/Widgets/addonmanager_widget_progress_bar.py b/src/Mod/AddonManager/Widgets/addonmanager_widget_progress_bar.py index a2f6bdebce..6f0c9971be 100644 --- a/src/Mod/AddonManager/Widgets/addonmanager_widget_progress_bar.py +++ b/src/Mod/AddonManager/Widgets/addonmanager_widget_progress_bar.py @@ -53,7 +53,6 @@ _TOTAL_INCREMENTS = 1000 class WidgetProgressBar(QtWidgets.QWidget): - """A multipart progress bar widget, including a stop button and a status label. Defaults to a single range with 100 increments, but can be configured with any number of major and minor ranges. Clicking the stop button will emit a signal, but does not otherwise affect the diff --git a/src/Mod/AddonManager/addonmanager_readme_controller.py b/src/Mod/AddonManager/addonmanager_readme_controller.py index d699bc6156..7507db4afd 100644 --- a/src/Mod/AddonManager/addonmanager_readme_controller.py +++ b/src/Mod/AddonManager/addonmanager_readme_controller.py @@ -45,7 +45,6 @@ class ReadmeDataType(IntEnum): class ReadmeController(QtCore.QObject): - """A class that can provide README data from an Addon, possibly loading external resources such as images""" diff --git a/src/Mod/AddonManager/manage_python_dependencies.py b/src/Mod/AddonManager/manage_python_dependencies.py index 969b7d83c8..ba81a24970 100644 --- a/src/Mod/AddonManager/manage_python_dependencies.py +++ b/src/Mod/AddonManager/manage_python_dependencies.py @@ -117,7 +117,6 @@ def call_pip(args) -> List[str]: class PythonPackageManager: - """A GUI-based pip interface allowing packages to be updated, either individually or all at once.""" diff --git a/src/Mod/Drawing/DrawingPatterns.py b/src/Mod/Drawing/DrawingPatterns.py index 9e8112155b..ea74564480 100644 --- a/src/Mod/Drawing/DrawingPatterns.py +++ b/src/Mod/Drawing/DrawingPatterns.py @@ -135,7 +135,6 @@ AutocadPatterns = { def buildPattern(name, scale=5, thickness=1, color="#000000"): - """buildPattern(name,scale=5,thickness=1,color="#000000") builds an SVG fragment from a name and path data""" @@ -158,7 +157,6 @@ def buildPattern(name, scale=5, thickness=1, color="#000000"): def buildTextureImage(name, scale=5, thickness=1, color="#000000", size=64): - """buildTextureImage(name,scale,thickness,color="#000000",size=64) builds a 64x64 SVG image filled with the given texture""" @@ -190,7 +188,6 @@ def buildTextureImage(name, scale=5, thickness=1, color="#000000", size=64): def buildSwatch(name, scale=5, thickness=1, color="#000000", size=64): - """buildSwatch(name,scale,thickness,color="#000000",size=64) builds a 64x64 SVG image filled with the given texture, a white background and a border, to serve as a sample""" @@ -229,7 +226,6 @@ def buildSwatch(name, scale=5, thickness=1, color="#000000", size=64): def buildFileSwatch(name, scale=5, thickness=1, color="#000000", size=64, png=False): - """buildFileSwatch(name,scale,thickness,color="#000000",size=64,png=False) builds a 64x64 SVG image filled with the given texture, a white background and a border, to serve as a sample. The image @@ -256,7 +252,6 @@ def buildFileSwatch(name, scale=5, thickness=1, color="#000000", size=64, png=Fa def saveTestImage(filename, scales=[2.5, 5], thicknesses=[0.1, 0.2, 1]): - """saveTestImage(filename,scales=[2.5,5],thicknesses=[0.1,0.2,1]) builds a test SVG file showing all available patterns at given scales and thicknesses""" @@ -296,7 +291,6 @@ def saveTestImage(filename, scales=[2.5, 5], thicknesses=[0.1, 0.2, 1]): def decodeName(name, scale, thickness): - """decodeName(name,scale,thickness) : decodes names written in the form 'name_5_1'""" name = name.split("_") @@ -314,7 +308,6 @@ def decodeName(name, scale, thickness): def getPatternNames(): - """getPatternNames : returns available pattern names""" return Patterns.keys() diff --git a/src/Mod/Show/ShowUtils.py b/src/Mod/Show/ShowUtils.py index 5ba7e5bf87..dbc0e29002 100644 --- a/src/Mod/Show/ShowUtils.py +++ b/src/Mod/Show/ShowUtils.py @@ -23,7 +23,8 @@ def is3DObject(obj): """is3DObject(obj): tests if the object has some 3d geometry. - TempoVis is made only for objects in 3d view, so all objects that don't pass this check are ignored by TempoVis.""" + TempoVis is made only for objects in 3d view, so all objects that don't pass this check are ignored by TempoVis. + """ # See "Gui Problem Sketcher and TechDraw" https://forum.freecad.org/viewtopic.php?f=3&t=22797 diff --git a/src/Mod/Show/mTempoVis.py b/src/Mod/Show/mTempoVis.py index 599ae78217..c09f435a29 100644 --- a/src/Mod/Show/mTempoVis.py +++ b/src/Mod/Show/mTempoVis.py @@ -79,7 +79,8 @@ class TempoVis(object): MAINSTACK special value (a global stack for the document will be used), or None (then, the TV is not in any stack, and can be manually instertd into one if desired). - Any additional keyword args are assigned as attributes. You can use it to immediately set a tag, for example.""" + Any additional keyword args are assigned as attributes. You can use it to immediately set a tag, for example. + """ document = None stack = None # reference to stack this TV is in @@ -323,7 +324,8 @@ class TempoVis(object): def show(self, doc_obj_or_list, links_too=True, mild_restore=None): """show(doc_obj_or_list, links_too = True): shows objects (sets their Visibility to True). doc_obj_or_list can be a document object, or a list of document objects. - If links_too is True, all Links of the objects are also hidden, by setting LinkVisibility attribute of each object.""" + If links_too is True, all Links of the objects are also hidden, by setting LinkVisibility attribute of each object. + """ doc_obj_or_list = self._3D_objects(doc_obj_or_list) self.saveBodyVisibleFeature( doc_obj_or_list @@ -437,7 +439,8 @@ class TempoVis(object): Implementation detail: uses SoClipPlane node. If viewprovider already has a node of this type as direct child, one is used. Otherwise, new one is created and - inserted as the very first node. The node is left, but disabled when tempovis is restoring.""" + inserted as the very first node. The node is left, but disabled when tempovis is restoring. + """ from .SceneDetails.ObjectClipPlane import ObjectClipPlane from .ShowUtils import is3DObject diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 879d305298..bb5d8debe9 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -304,7 +304,6 @@ def getDefaultIcon(): def build_new_file_card(template): - """builds an html
  • element representing a new file quick start button""" @@ -358,7 +357,6 @@ def build_new_file_card(template): def buildCard(filename, method, arg=None): - """builds an html
  • element representing a file. method is a script + a keyword, for ex. url.py?key=""" diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 7ae5da8ca3..032c4d525c 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -560,6 +560,7 @@ class DocumentBasicCases(unittest.TestCase): def testNotification_Issue2996(self): if not FreeCAD.GuiUp: return + # works only if Gui is shown class ViewProvider: def __init__(self, vobj): diff --git a/src/Mod/Test/TestGui.py b/src/Mod/Test/TestGui.py index a846ed3899..0391e3d3ef 100644 --- a/src/Mod/Test/TestGui.py +++ b/src/Mod/Test/TestGui.py @@ -33,6 +33,7 @@ import FreeCAD, FreeCADGui import TestApp # Test as Module name not possible import sys + # --------------------------------------------------------------------------- # define the Commands of the Test Application module # --------------------------------------------------------------------------- diff --git a/src/Tools/SubWCRev.py b/src/Tools/SubWCRev.py index e2b38d1b10..22e0cc9a6a 100644 --- a/src/Tools/SubWCRev.py +++ b/src/Tools/SubWCRev.py @@ -19,6 +19,7 @@ try: except ImportError: from io import StringIO + # SAX handler to parse the subversion output class SvnHandler(xml.sax.handler.ContentHandler): def __init__(self): diff --git a/src/Tools/doctools.py b/src/Tools/doctools.py index 398aa58720..243cb5b913 100644 --- a/src/Tools/doctools.py +++ b/src/Tools/doctools.py @@ -9,6 +9,7 @@ import xml.sax.handler import xml.sax.xmlreader import zipfile + # SAX handler to parse the Document.xml class DocumentHandler(xml.sax.handler.ContentHandler): def __init__(self, dirname): diff --git a/src/Tools/embedded/PySide/mainwindow.py b/src/Tools/embedded/PySide/mainwindow.py index 597de09470..c1cf86c20e 100644 --- a/src/Tools/embedded/PySide/mainwindow.py +++ b/src/Tools/embedded/PySide/mainwindow.py @@ -21,6 +21,7 @@ class MainWindow(QtGui.QMainWindow): def showEvent(self, event): FreeCADGui.showMainWindow() self.setCentralWidget(FreeCADGui.getMainWindow()) + # Need version >= 0.16.5949 class BlankWorkbench(FreeCADGui.Workbench): MenuText = "Blank" diff --git a/src/Tools/embedded/PySide/mainwindow2.py b/src/Tools/embedded/PySide/mainwindow2.py index 272903f1df..974f2f301b 100644 --- a/src/Tools/embedded/PySide/mainwindow2.py +++ b/src/Tools/embedded/PySide/mainwindow2.py @@ -19,6 +19,7 @@ class MainWindow(QtGui.QMainWindow): def showEvent(self, event): FreeCADGui.showMainWindow() self.setCentralWidget(FreeCADGui.getMainWindow()) + # Need version >= 0.16.5949 class BlankWorkbench(FreeCADGui.Workbench): MenuText = "Blank" diff --git a/src/Tools/embedded/PySide/mainwindow3.py b/src/Tools/embedded/PySide/mainwindow3.py index 0ab78ea9ef..8f43fac3db 100644 --- a/src/Tools/embedded/PySide/mainwindow3.py +++ b/src/Tools/embedded/PySide/mainwindow3.py @@ -28,6 +28,7 @@ class MainWindow(QtGui.QMainWindow): ) addr = PyCObject_AsVoidPtr(hwnd) FreeCADGui.embedToWindow(hex(addr)) + # Need version >= 0.16.5949 class BlankWorkbench(FreeCADGui.Workbench): MenuText = "Blank" diff --git a/src/Tools/generateBase/generateTools.py b/src/Tools/generateBase/generateTools.py index a7fc45d57f..a9f74b84a6 100644 --- a/src/Tools/generateBase/generateTools.py +++ b/src/Tools/generateBase/generateTools.py @@ -26,6 +26,7 @@ def convertMultilineString(str): import sys + # utility stuff to avoid tests in the mainline code class _nevermatch: "Polymorphic with a regex that never matches" diff --git a/src/Tools/updateppa.py b/src/Tools/updateppa.py index c763ca6def..db79afff92 100644 --- a/src/Tools/updateppa.py +++ b/src/Tools/updateppa.py @@ -20,7 +20,9 @@ def runUpdate(filename): # Location of branch on local system local_branch = remote_branch.bzrdir.sprout(LOCAL_BRANCH).open_branch() - False if local_branch.__name__ else True # "Use" to silence analyzers, pending PEP 640 or similar + ( + False if local_branch.__name__ else True + ) # "Use" to silence analyzers, pending PEP 640 or similar # Change a file in the local branch try: