Commits

Georg Brandl committed 9d15ad6

Fix long lines reported by "make check".

Comments (0)

Files changed (3)

sphinx/search/__init__.py

     def context_for_searchtool(self):
         return dict(
             search_language_stemming_code = self.lang.js_stemmer_code,
-            search_language_stop_words = jsdump.dumps(sorted(self.lang.stopwords)),
+            search_language_stop_words =
+                jsdump.dumps(sorted(self.lang.stopwords)),
             search_scorer_tool = self.js_scorer_code,
         )

sphinx/util/nodes.py

                                  rawsource.split("\n", 2)[0]
         # workaround: nodes.caption doesn't have source, line.
         # this issue was filed to Docutils tracker:
-        # https://sourceforge.net/tracker/?func=detail&aid=3599485&group_id=38414&atid=422032
+        # sf.net/tracker/?func=detail&aid=3599485&group_id=38414&atid=422032
         if isinstance(node, nodes.caption) and not node.source:
             node.source = node.parent.source
             node.line = 0  #need fix docutils to get `node.line`

tests/test_intl.py

                 if p.returncode != 0:
                     print stdout
                     print stderr
-                    assert False, 'msgfmt exited with return code %s' % p.returncode
+                    assert False, \
+                        'msgfmt exited with return code %s' % p.returncode
                 assert mo.isfile(), 'msgfmt failed'
 
 
     app.builder.build(['refs_inconsistency'])
     result = (app.outdir / 'refs_inconsistency.html').text(encoding='utf-8')
 
-    expected_expr = """<a class="reference external" href="http://www.example.com">reference</a>"""
+    expected_expr = ('<a class="reference external" '
+                     'href="http://www.example.com">reference</a>')
     assert len(re.findall(expected_expr, result)) == 2
 
-    expected_expr = """<a class="reference internal" href="#reference">reference</a>"""
+    expected_expr = ('<a class="reference internal" '
+                     'href="#reference">reference</a>')
     assert len(re.findall(expected_expr, result)) == 0
 
-    expected_expr = """<a class="reference internal" href="#i18n-with-refs-inconsistency">I18N WITH REFS INCONSISTENCY</a>"""
+    expected_expr = ('<a class="reference internal" '
+                     'href="#i18n-with-refs-inconsistency">I18N WITH '
+                     'REFS INCONSISTENCY</a>')
     assert len(re.findall(expected_expr, result)) == 1
 
 
     result = (app.outdir / 'external_links.html').text(encoding='utf-8')
 
     # external link check
-    expect_line = u"""<li>EXTERNAL LINK TO <a class="reference external" href="http://python.org">Python</a>.</li>"""
+    expect_line = (u'<li>EXTERNAL LINK TO <a class="reference external" '
+                   u'href="http://python.org">Python</a>.</li>')
     matched = re.search('^<li>EXTERNAL LINK TO .*$', result, re.M)
     matched_line = ''
     if matched:
     assert expect_line == matched_line
 
     # internal link check
-    expect_line = u"""<li><a class="reference internal" href="#i18n-with-external-links">EXTERNAL LINKS</a> IS INTERNAL LINK.</li>"""
+    expect_line = (u'<li><a class="reference internal" '
+                   u'href="#i18n-with-external-links">EXTERNAL '
+                   u'LINKS</a> IS INTERNAL LINK.</li>')
     matched = re.search('^<li><a .* IS INTERNAL LINK.</li>$', result, re.M)
     matched_line = ''
     if matched:
     assert expect_line == matched_line
 
     # inline link check
-    expect_line = u"""<li>INLINE LINK BY <a class="reference external" href="http://sphinx-doc.org">SPHINX</a>.</li>"""
+    expect_line = (u'<li>INLINE LINK BY <a class="reference external" '
+                   u'href="http://sphinx-doc.org">SPHINX</a>.</li>')
     matched = re.search('^<li>INLINE LINK BY .*$', result, re.M)
     matched_line = ''
     if matched:
     assert expect_line == matched_line
 
     # unnamed link check
-    expect_line = u"""<li>UNNAMED <a class="reference external" href="http://google.com">LINK</a>.</li>"""
+    expect_line = (u'<li>UNNAMED <a class="reference external" '
+                   u'href="http://google.com">LINK</a>.</li>')
     matched = re.search('^<li>UNNAMED .*$', result, re.M)
     matched_line = ''
     if matched: