From 2ba3e561b2a1d5bd5aaa592b1785b1d089a20036 Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Sun, 15 Jun 2014 15:42:23 +0900 Subject: [PATCH] * fix over 80 chars line and remove unused import. --- sphinx/builders/html.py | 4 +++- sphinx/directives/__init__.py | 1 - sphinx/domains/c.py | 1 - sphinx/domains/javascript.py | 2 -- sphinx/ext/autodoc.py | 2 +- sphinx/ext/autosummary/__init__.py | 3 ++- sphinx/search/__init__.py | 9 ++++++--- sphinx/transforms.py | 1 - sphinx/util/nodes.py | 1 - 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index eeda60317..a9e6a3680 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -817,7 +817,9 @@ class StandaloneHTMLBuilder(Builder): self.info('done') def dump_search_index(self): - self.info(bold('dumping search index in %s ... ' % self.indexer.label()), nonl=True) + self.info( + bold('dumping search index in %s ... ' % self.indexer.label()), + nonl=True) self.indexer.prune(self.env.all_docs) searchindexfn = path.join(self.outdir, self.searchindex_filename) # first write to a temporary file, so that if dumping fails, diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 3ac222025..52b638fe0 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -11,7 +11,6 @@ import re -from six import itervalues from docutils.parsers.rst import Directive, directives from sphinx import addnodes diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index 0ac1b7aba..1c34207f8 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -12,7 +12,6 @@ import re import string -from six import iteritems from docutils import nodes from sphinx import addnodes diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index 8cc49b098..2718b8727 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -9,8 +9,6 @@ :license: BSD, see LICENSE for details. """ -from six import iteritems - from sphinx import addnodes from sphinx.domains import Domain, ObjType from sphinx.locale import l_, _ diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 5938f30f1..d04b68fe1 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -987,7 +987,7 @@ class DocstringStripSignatureMixin(DocstringSignatureMixin): # Documenter.format_signature use self.args value to format. _args, self.retann = result return Documenter.format_signature(self) - + class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): """ diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index b9e56538a..9041dc47e 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -265,7 +265,8 @@ class Autosummary(Directive): # try to also get a source code analyzer for attribute docs try: - documenter.analyzer = ModuleAnalyzer.for_module(documenter.get_real_modname()) + documenter.analyzer = ModuleAnalyzer.for_module( + documenter.get_real_modname()) # parse right now, to get PycodeErrors on parsing (results will # be cached anyway) documenter.analyzer.find_attr_docs() diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 43e3e4048..b81e08bbd 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -92,9 +92,12 @@ var Stemmer = function() { Return true if the target word should be registered in the search index. This method is called after stemming. """ - return len(word) == 0 or not (((len(word) < 3) and (12353 < ord(word[0]) < 12436)) or - (ord(word[0]) < 256 and (len(word) < 3 or word in self.stopwords or - word.isdigit()))) + return ( + len(word) == 0 or not ( + ((len(word) < 3) and (12353 < ord(word[0]) < 12436)) or + (ord(word[0]) < 256 and ( + len(word) < 3 or word in self.stopwords or word.isdigit() + )))) # SearchEnglish imported after SearchLanguage is defined due to circular import diff --git a/sphinx/transforms.py b/sphinx/transforms.py index e5f8596f5..e5b0021a7 100644 --- a/sphinx/transforms.py +++ b/sphinx/transforms.py @@ -22,7 +22,6 @@ from sphinx.locale import _, init as init_locale from sphinx.util import split_index_msg from sphinx.util.nodes import traverse_translatable_index, extract_messages from sphinx.util.osutil import ustrftime, find_catalog -from sphinx.util.compat import docutils_version from sphinx.domains.std import ( make_term_from_paragraph_node, make_termnodes_from_paragraph_node, diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index ed7abe865..4501ed9d4 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -10,7 +10,6 @@ """ import re -import sys from docutils import nodes