[Python-checkins] r61698 - in doctools/trunk: sphinx/builder.py sphinx/environment.py sphinx/highlighting.py sphinx/latexwriter.py sphinx/quickstart.py sphinx/templates/layout.html utils/check_sources.py
georg.brandl
python-checkins at python.org
Fri Mar 21 16:27:21 CET 2008
Author: georg.brandl
Date: Fri Mar 21 16:27:21 2008
New Revision: 61698
Modified:
doctools/trunk/ (props changed)
doctools/trunk/sphinx/builder.py
doctools/trunk/sphinx/environment.py
doctools/trunk/sphinx/highlighting.py
doctools/trunk/sphinx/latexwriter.py
doctools/trunk/sphinx/quickstart.py
doctools/trunk/sphinx/templates/layout.html
doctools/trunk/utils/check_sources.py
Log:
Fix a few overlong lines, and use \t instead of literal tabs.
Modified: doctools/trunk/sphinx/builder.py
==============================================================================
--- doctools/trunk/sphinx/builder.py (original)
+++ doctools/trunk/sphinx/builder.py Fri Mar 21 16:27:21 2008
@@ -392,7 +392,8 @@
# the sorted list of all modules, for the global module index
modules = sorted(((mn, (self.get_relative_uri('modindex', fn) +
'#module-' + mn, sy, pl, dep))
- for (mn, (fn, sy, pl, dep)) in self.env.modules.iteritems()),
+ for (mn, (fn, sy, pl, dep)) in
+ self.env.modules.iteritems()),
key=lambda x: x[0].lower())
# collect all platforms
platforms = set()
Modified: doctools/trunk/sphinx/environment.py
==============================================================================
--- doctools/trunk/sphinx/environment.py (original)
+++ doctools/trunk/sphinx/environment.py Fri Mar 21 16:27:21 2008
@@ -327,7 +327,8 @@
added.add(docname)
else:
# if the doctree file is not there, rebuild
- if not path.isfile(self.doc2path(docname, self.doctreedir, '.doctree')):
+ if not path.isfile(self.doc2path(docname, self.doctreedir,
+ '.doctree')):
changed.add(docname)
continue
mtime, md5sum = self.all_docs[docname]
@@ -376,7 +377,8 @@
self.read_doc(docname, app=app)
if config.master_doc not in self.all_docs:
- self.warn(None, 'master file %s not found' % self.doc2path(config.master_doc))
+ self.warn(None, 'master file %s not found' %
+ self.doc2path(config.master_doc))
# --------- SINGLE FILE BUILDING -------------------------------------------
Modified: doctools/trunk/sphinx/highlighting.py
==============================================================================
--- doctools/trunk/sphinx/highlighting.py (original)
+++ doctools/trunk/sphinx/highlighting.py Fri Mar 21 16:27:21 2008
@@ -104,7 +104,7 @@
# maybe Python -- try parsing it
src = source + '\n'
- # Replace "..." by a special mark, which is also a valid python expression
+ # Replace "..." by a mark which is also a valid python expression
# (Note, the highlighter gets the original source, this is only done
# to allow "..." in code and still highlight it as Python code.)
mark = "__highlighting__ellipsis__"
@@ -133,7 +133,8 @@
fmter = (self.dest == 'html' and self.hfmter or self.lfmter)[bool(linenos)]
return highlight(source, lexer, fmter)
except ErrorToken:
- # this is most probably not the selected language, so let it pass unhighlighted
+ # this is most probably not the selected language,
+ # so let it pass unhighlighted
return unhighlighted()
def get_stylesheet(self):
Modified: doctools/trunk/sphinx/latexwriter.py
==============================================================================
--- doctools/trunk/sphinx/latexwriter.py (original)
+++ doctools/trunk/sphinx/latexwriter.py Fri Mar 21 16:27:21 2008
@@ -100,7 +100,8 @@
'release': builder.config.release,
'date': date,
}
- self.highlighter = highlighting.PygmentsBridge('latex', builder.config.pygments_style)
+ self.highlighter = highlighting.PygmentsBridge(
+ 'latex', builder.config.pygments_style)
self.context = []
self.descstack = []
self.highlightlang = 'python'
Modified: doctools/trunk/sphinx/quickstart.py
==============================================================================
--- doctools/trunk/sphinx/quickstart.py (original)
+++ doctools/trunk/sphinx/quickstart.py Fri Mar 21 16:27:21 2008
@@ -187,58 +187,58 @@
.PHONY: help clean html web htmlhelp latex changes linkcheck
help:
- @echo "Please use \\`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " web to make files usable by Sphinx.web"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " changes to make an overview over all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
+\t at echo "Please use \\`make <target>' where <target> is one of"
+\t at echo " html to make standalone HTML files"
+\t at echo " web to make files usable by Sphinx.web"
+\t at echo " htmlhelp to make HTML files and a HTML help project"
+\t at echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+\t at echo " changes to make an overview over all changed/added/deprecated items"
+\t at echo " linkcheck to check all external links for integrity"
clean:
- -rm -rf %(rbuilddir)s/*
+\t-rm -rf %(rbuilddir)s/*
html:
- mkdir -p %(rbuilddir)s/html %(rbuilddir)s/doctrees
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) %(rbuilddir)s/html
- @echo
- @echo "Build finished. The HTML pages are in %(rbuilddir)s/html."
+\tmkdir -p %(rbuilddir)s/html %(rbuilddir)s/doctrees
+\t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) %(rbuilddir)s/html
+\t at echo
+\t at echo "Build finished. The HTML pages are in %(rbuilddir)s/html."
web:
- mkdir -p %(rbuilddir)s/web %(rbuilddir)s/doctrees
- $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) %(rbuilddir)s/web
- @echo
- @echo "Build finished; now you can run"
- @echo " python -m sphinx.web %(rbuilddir)s/web"
- @echo "to start the server."
+\tmkdir -p %(rbuilddir)s/web %(rbuilddir)s/doctrees
+\t$(SPHINXBUILD) -b web $(ALLSPHINXOPTS) %(rbuilddir)s/web
+\t at echo
+\t at echo "Build finished; now you can run"
+\t at echo " python -m sphinx.web %(rbuilddir)s/web"
+\t at echo "to start the server."
htmlhelp:
- mkdir -p %(rbuilddir)s/htmlhelp %(rbuilddir)s/doctrees
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) %(rbuilddir)s/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \\
- ".hhp project file in %(rbuilddir)s/htmlhelp."
+\tmkdir -p %(rbuilddir)s/htmlhelp %(rbuilddir)s/doctrees
+\t$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) %(rbuilddir)s/htmlhelp
+\t at echo
+\t at echo "Build finished; now you can run HTML Help Workshop with the" \\
+\t ".hhp project file in %(rbuilddir)s/htmlhelp."
latex:
- mkdir -p %(rbuilddir)s/latex %(rbuilddir)s/doctrees
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) %(rbuilddir)s/latex
- @echo
- @echo "Build finished; the LaTeX files are in %(rbuilddir)s/latex."
- @echo "Run \\`make all-pdf' or \\`make all-ps' in that directory to" \\
- "run these through (pdf)latex."
+\tmkdir -p %(rbuilddir)s/latex %(rbuilddir)s/doctrees
+\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) %(rbuilddir)s/latex
+\t at echo
+\t at echo "Build finished; the LaTeX files are in %(rbuilddir)s/latex."
+\t at echo "Run \\`make all-pdf' or \\`make all-ps' in that directory to" \\
+\t "run these through (pdf)latex."
changes:
- mkdir -p %(rbuilddir)s/changes %(rbuilddir)s/doctrees
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) %(rbuilddir)s/changes
- @echo
- @echo "The overview file is in %(rbuilddir)s/changes."
+\tmkdir -p %(rbuilddir)s/changes %(rbuilddir)s/doctrees
+\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) %(rbuilddir)s/changes
+\t at echo
+\t at echo "The overview file is in %(rbuilddir)s/changes."
linkcheck:
- mkdir -p %(rbuilddir)s/linkcheck %(rbuilddir)s/doctrees
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) %(rbuilddir)s/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \\
- "or in %(rbuilddir)s/linkcheck/output.txt."
+\tmkdir -p %(rbuilddir)s/linkcheck %(rbuilddir)s/doctrees
+\t$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) %(rbuilddir)s/linkcheck
+\t at echo
+\t at echo "Link check complete; look for any errors in the above output " \\
+\t "or in %(rbuilddir)s/linkcheck/output.txt."
'''
Modified: doctools/trunk/sphinx/templates/layout.html
==============================================================================
--- doctools/trunk/sphinx/templates/layout.html (original)
+++ doctools/trunk/sphinx/templates/layout.html Fri Mar 21 16:27:21 2008
@@ -86,7 +86,7 @@
<body>
{%- block beforerelbar %}{% endblock %}
-{%- block relbar1 %}{{ relbar() }}{% endblock %}
+{%- block relbar1 %}{{ relbar() }}{% endblock %}
{%- block afterrelbar %}{% endblock %}
{%- block beforesidebar1 %}{% endblock %}
@@ -114,7 +114,7 @@
<div class="clearer"></div>
</div>
-{%- block relbar2 %}{{ relbar() }}{% endblock %}
+{%- block relbar2 %}{{ relbar() }}{% endblock %}
{%- block beforefooter %}{% endblock %}
{%- block footer %}
Modified: doctools/trunk/utils/check_sources.py
==============================================================================
--- doctools/trunk/utils/check_sources.py (original)
+++ doctools/trunk/utils/check_sources.py Fri Mar 21 16:27:21 2008
@@ -139,7 +139,7 @@
yield 0, "no correct copyright info"
- at checker('.py', '.html', '.js')
+ at checker('.py', '.html')
def check_whitespace_and_spelling(fn, lines):
for lno, line in enumerate(lines):
if "\t" in line:
More information about the Python-checkins
mailing list