From 29bd6a33377b2d45397f9b23f25b1687477c6e16 Mon Sep 17 00:00:00 2001 From: Pete Peterson <petersonpf@ornl.gov> Date: Wed, 14 Oct 2015 16:03:42 -0400 Subject: [PATCH] Re #13987. Fixing pylint warnings. --- docs/sphinxext/mantiddoc/directives/algorithm.py | 3 --- docs/sphinxext/mantiddoc/directives/attributes.py | 4 +--- docs/sphinxext/mantiddoc/directives/diagram.py | 2 +- docs/sphinxext/mantiddoc/directives/interface.py | 3 +-- docs/sphinxext/mantiddoc/directives/sourcelink.py | 2 +- docs/sphinxext/mantiddoc/directives/summary.py | 2 +- docs/sphinxext/mantiddoc/doctest.py | 6 ++++-- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/sphinxext/mantiddoc/directives/algorithm.py b/docs/sphinxext/mantiddoc/directives/algorithm.py index a7d92a9a18d..e01645c182f 100644 --- a/docs/sphinxext/mantiddoc/directives/algorithm.py +++ b/docs/sphinxext/mantiddoc/directives/algorithm.py @@ -1,7 +1,4 @@ from mantiddoc.directives.base import AlgorithmBaseDirective -from docutils import nodes -from sphinx.locale import _ -from sphinx.util.compat import make_admonition import os import re diff --git a/docs/sphinxext/mantiddoc/directives/attributes.py b/docs/sphinxext/mantiddoc/directives/attributes.py index 2c224b2d798..3f45b202129 100644 --- a/docs/sphinxext/mantiddoc/directives/attributes.py +++ b/docs/sphinxext/mantiddoc/directives/attributes.py @@ -1,6 +1,4 @@ -from properties import PropertiesDirective -import string - +from mantiddoc.directives.properties import PropertiesDirective class AttributesDirective(PropertiesDirective): diff --git a/docs/sphinxext/mantiddoc/directives/diagram.py b/docs/sphinxext/mantiddoc/directives/diagram.py index e9fd957acb9..2ae58bf405a 100644 --- a/docs/sphinxext/mantiddoc/directives/diagram.py +++ b/docs/sphinxext/mantiddoc/directives/diagram.py @@ -1,4 +1,4 @@ -from base import BaseDirective +from mantiddoc.directives.base import BaseDirective from sphinx.locale import _ import os, string, subprocess diff --git a/docs/sphinxext/mantiddoc/directives/interface.py b/docs/sphinxext/mantiddoc/directives/interface.py index 531e6297162..42dbbaef231 100644 --- a/docs/sphinxext/mantiddoc/directives/interface.py +++ b/docs/sphinxext/mantiddoc/directives/interface.py @@ -1,5 +1,4 @@ -from base import BaseDirective -from sphinx.locale import _ +from mantiddoc.directives.base import BaseDirective import os class InterfaceDirective(BaseDirective): diff --git a/docs/sphinxext/mantiddoc/directives/sourcelink.py b/docs/sphinxext/mantiddoc/directives/sourcelink.py index 8ff7598f529..1d75ba89c47 100644 --- a/docs/sphinxext/mantiddoc/directives/sourcelink.py +++ b/docs/sphinxext/mantiddoc/directives/sourcelink.py @@ -87,7 +87,7 @@ class SourceLinkDirective(AlgorithmBaseDirective): raise SourceLinkError(error_string) try: - self.output_to_page(file_paths,file_name,sanity_checks); + self.output_to_page(file_paths,file_name,sanity_checks) except SourceLinkError as err: error_string += str(err) + "\n" diff --git a/docs/sphinxext/mantiddoc/directives/summary.py b/docs/sphinxext/mantiddoc/directives/summary.py index cb0403e75fe..71870dc64b4 100644 --- a/docs/sphinxext/mantiddoc/directives/summary.py +++ b/docs/sphinxext/mantiddoc/directives/summary.py @@ -1,4 +1,4 @@ -from base import AlgorithmBaseDirective +from mantiddoc.directives.base import AlgorithmBaseDirective class SummaryDirective(AlgorithmBaseDirective): diff --git a/docs/sphinxext/mantiddoc/doctest.py b/docs/sphinxext/mantiddoc/doctest.py index 3bd4bea3581..e4364825320 100644 --- a/docs/sphinxext/mantiddoc/doctest.py +++ b/docs/sphinxext/mantiddoc/doctest.py @@ -172,8 +172,10 @@ class TestSuiteReport(object): @property def nfailed(self): def sum_failure(fails, case): - if case.failed: return fails + 1 - else: return fails + if case.failed: + return fails + 1 + else: + return fails return reduce(sum_failure, self.testcases, 0) @property -- GitLab