Skip to content
Snippets Groups Projects
Commit 62e77377 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Re #13987. Fixing pylint warnings.

parent 36252de2
No related branches found
No related tags found
No related merge requests found
......@@ -21,4 +21,4 @@ def skip(app, what, name, obj, skip, options):
def setup(app):
# Define which methods are skipped when running autodoc
# on a member
app.connect("autodoc-skip-member", skip)
\ No newline at end of file
app.connect("autodoc-skip-member", skip)
......@@ -7,7 +7,15 @@
'mantiddoc.directives' to be added to the Sphinx extensions configuration.
"""
import algorithm, alias, attributes, categories, diagram, interface, properties, sourcelink, summary
import mantiddoc.directives.algorithm
import mantiddoc.directives.alias
import mantiddoc.directives.attributes
import mantiddoc.directives.categories
import mantiddoc.directives.diagram
import mantiddoc.directives.interface
import mantiddoc.directives.properties
import mantiddoc.directives.sourcelink
import mantiddoc.directives.summary
def setup(app):
"""
......
from base import AlgorithmBaseDirective
from mantiddoc.directives.base import AlgorithmBaseDirective
from docutils import nodes
from sphinx.locale import _
from sphinx.util.compat import make_admonition
......
from base import AlgorithmBaseDirective
from mantiddoc.directives.base import AlgorithmBaseDirective
class AliasDirective(AlgorithmBaseDirective):
......
......@@ -6,7 +6,7 @@
creates "index" pages that lists the contents of each category. The display of each
"index" page is controlled by a jinja2 template.
"""
from base import AlgorithmBaseDirective, algorithm_name_and_version
from mantiddoc.directives.base import AlgorithmBaseDirective, algorithm_name_and_version
from sphinx.util.osutil import relative_uri
import os
......
from base import AlgorithmBaseDirective
import string
from mantiddoc.directives.base import AlgorithmBaseDirective
class PropertiesDirective(AlgorithmBaseDirective):
......@@ -138,7 +137,7 @@ class PropertiesDirective(AlgorithmBaseDirective):
if (direction_string[prop.direction] == "Output") and \
(not isinstance(prop, IWorkspaceProperty)):
default_prop = ""
elif (prop.isValid == ""):
elif prop.isValid == "":
default_prop = self._create_property_default_string(prop)
else:
default_prop = "*Mandatory*"
......@@ -161,14 +160,14 @@ class PropertiesDirective(AlgorithmBaseDirective):
# Convert to int, then float, then any string
try:
val = int(default)
if (val >= 2147483647):
if val >= 2147483647:
defaultstr = "*Optional*"
else:
defaultstr = str(val)
except:
try:
val = float(default)
if (val >= 1e+307):
if val >= 1e+307:
defaultstr = "*Optional*"
else:
defaultstr = str(val)
......
......@@ -86,14 +86,14 @@ def custominterface_screenshot(name, directory, ext = ".png", widget_name = None
dlg = threadsafe_call(iface_mgr.createSubWindow, name, None)
if dlg is None:
raise RuntimeError("Interface '%s' could not be created" % name)
raise RuntimeError("Interface '%s' could not be created" % name)
if widget_name:
widget = dlg.findChild(QWidget, widget_name)
if widget is None:
raise RuntimeError("Widget '%s' does not exist in interface '%s'" % (widget_name, name))
picture = Screenshot(widget, name.replace(' ','_') + "_" + widget_name + "_widget" + ext, directory)
widget = dlg.findChild(QWidget, widget_name)
if widget is None:
raise RuntimeError("Widget '%s' does not exist in interface '%s'" % (widget_name, name))
picture = Screenshot(widget, name.replace(' ','_') + "_" + widget_name + "_widget" + ext, directory)
else:
picture = Screenshot(dlg, name.replace(' ','_') + "_interface" + ext, directory)
picture = Screenshot(dlg, name.replace(' ','_') + "_interface" + ext, directory)
threadsafe_call(dlg.close)
return picture
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment