* fix over 80 chars line and remove unused import.

This commit is contained in:
Takayuki Shimizukawa 2014-06-15 15:42:23 +09:00
parent f4928987f0
commit 2ba3e561b2
9 changed files with 12 additions and 12 deletions

View File

@ -817,7 +817,9 @@ class StandaloneHTMLBuilder(Builder):
self.info('done') self.info('done')
def dump_search_index(self): 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) self.indexer.prune(self.env.all_docs)
searchindexfn = path.join(self.outdir, self.searchindex_filename) searchindexfn = path.join(self.outdir, self.searchindex_filename)
# first write to a temporary file, so that if dumping fails, # first write to a temporary file, so that if dumping fails,

View File

@ -11,7 +11,6 @@
import re import re
from six import itervalues
from docutils.parsers.rst import Directive, directives from docutils.parsers.rst import Directive, directives
from sphinx import addnodes from sphinx import addnodes

View File

@ -12,7 +12,6 @@
import re import re
import string import string
from six import iteritems
from docutils import nodes from docutils import nodes
from sphinx import addnodes from sphinx import addnodes

View File

@ -9,8 +9,6 @@
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
""" """
from six import iteritems
from sphinx import addnodes from sphinx import addnodes
from sphinx.domains import Domain, ObjType from sphinx.domains import Domain, ObjType
from sphinx.locale import l_, _ from sphinx.locale import l_, _

View File

@ -987,7 +987,7 @@ class DocstringStripSignatureMixin(DocstringSignatureMixin):
# Documenter.format_signature use self.args value to format. # Documenter.format_signature use self.args value to format.
_args, self.retann = result _args, self.retann = result
return Documenter.format_signature(self) return Documenter.format_signature(self)
class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):
""" """

View File

@ -265,7 +265,8 @@ class Autosummary(Directive):
# try to also get a source code analyzer for attribute docs # try to also get a source code analyzer for attribute docs
try: 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 # parse right now, to get PycodeErrors on parsing (results will
# be cached anyway) # be cached anyway)
documenter.analyzer.find_attr_docs() documenter.analyzer.find_attr_docs()

View File

@ -92,9 +92,12 @@ var Stemmer = function() {
Return true if the target word should be registered in the search index. Return true if the target word should be registered in the search index.
This method is called after stemming. This method is called after stemming.
""" """
return len(word) == 0 or not (((len(word) < 3) and (12353 < ord(word[0]) < 12436)) or return (
(ord(word[0]) < 256 and (len(word) < 3 or word in self.stopwords or len(word) == 0 or not (
word.isdigit()))) ((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 # SearchEnglish imported after SearchLanguage is defined due to circular import

View File

@ -22,7 +22,6 @@ from sphinx.locale import _, init as init_locale
from sphinx.util import split_index_msg from sphinx.util import split_index_msg
from sphinx.util.nodes import traverse_translatable_index, extract_messages from sphinx.util.nodes import traverse_translatable_index, extract_messages
from sphinx.util.osutil import ustrftime, find_catalog from sphinx.util.osutil import ustrftime, find_catalog
from sphinx.util.compat import docutils_version
from sphinx.domains.std import ( from sphinx.domains.std import (
make_term_from_paragraph_node, make_term_from_paragraph_node,
make_termnodes_from_paragraph_node, make_termnodes_from_paragraph_node,

View File

@ -10,7 +10,6 @@
""" """
import re import re
import sys
from docutils import nodes from docutils import nodes