Precommit: formatting fixes after Black update
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"""
|
||||
|
||||
|
||||
@@ -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."""
|
||||
|
||||
|
||||
@@ -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 <pattern> 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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -304,7 +304,6 @@ def getDefaultIcon():
|
||||
|
||||
|
||||
def build_new_file_card(template):
|
||||
|
||||
"""builds an html <li> 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 <li> element representing a file.
|
||||
method is a script + a keyword, for ex. url.py?key="""
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user