mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
* fix over 80 chars line and remove unused import.
This commit is contained in:
parent
f4928987f0
commit
2ba3e561b2
@ -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,
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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_, _
|
||||||
|
@ -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):
|
||||||
"""
|
"""
|
||||||
|
@ -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()
|
||||||
|
@ -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
|
||||||
|
@ -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,
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user