Anonymous avatar Anonymous committed 52a694d

Some pylint-found fixes and cleanups.

Comments (0)

Files changed (7)

             return self.trans.ugettext(string)
 
         def ngettext(self, singular, plural, n):
-            return senf.trans.ungettext(singular, plural, n)
+            return self.trans.ungettext(singular, plural, n)
 
     def __init__(self, *args, **kwargs):
         self.translator = kwargs['translator']

sphinx/environment.py

 from docutils.parsers.rst.languages import en as english
 from docutils.transforms import Transform
 from docutils.transforms.parts import ContentsFilter
-from docutils.transforms.universal import FilterMessages
 
 # monkey-patch reST parser to disable alphabetic and roman enumerated lists
 from docutils.parsers.rst.states import Body
         self.docname = None
         self.currmodule = None
         self.currclass = None
-        self.indexnum = 0
         self.gloss_entries = set()
 
         if save_parsed:

sphinx/ext/autodoc.py

 import sys
 import types
 import inspect
-import textwrap
 import linecache
 from types import FunctionType, BuiltinMethodType, MethodType
 

sphinx/ext/jsmath.py

 from docutils import nodes
 
 from sphinx.application import ExtensionError
-from sphinx.ext.mathbase import setup as mathbase_setup, wrap_displaymath
+from sphinx.ext.mathbase import setup as mathbase_setup
 
 
 def html_visit_math(self, node):

sphinx/ext/pngmath.py

 from os import path
 from subprocess import Popen, PIPE
 try:
-    from hashlib import sha
+    from hashlib import sha1 as sha
 except ImportError:
     from sha import sha
 

sphinx/latexwriter.py

         self.highlightlinenothreshold = node['linenothreshold']
         raise nodes.SkipNode
 
-    def visit_comment(self, node):
-        raise nodes.SkipNode
-
     def visit_section(self, node):
         if not self.this_is_the_title:
             self.sectionlevel += 1

sphinx/textwriter.py

     def depart_admonition(self, node):
         self.end_state()
 
-    def visit_admonition(self, node):
+    def _visit_admonition(self, node):
         self.new_state(2)
     def _make_depart_admonition(name):
         def depart_admonition(self, node):
             self.end_state(first=admonitionlabels[name] + ': ')
         return depart_admonition
 
-    visit_attention = visit_admonition
+    visit_attention = _visit_admonition
     depart_attention = _make_depart_admonition('attention')
-    visit_caution = visit_admonition
+    visit_caution = _visit_admonition
     depart_caution = _make_depart_admonition('caution')
-    visit_danger = visit_admonition
+    visit_danger = _visit_admonition
     depart_danger = _make_depart_admonition('danger')
-    visit_error = visit_admonition
+    visit_error = _visit_admonition
     depart_error = _make_depart_admonition('error')
-    visit_hint = visit_admonition
+    visit_hint = _visit_admonition
     depart_hint = _make_depart_admonition('hint')
-    visit_important = visit_admonition
+    visit_important = _visit_admonition
     depart_important = _make_depart_admonition('important')
-    visit_note = visit_admonition
+    visit_note = _visit_admonition
     depart_note = _make_depart_admonition('note')
-    visit_tip = visit_admonition
+    visit_tip = _visit_admonition
     depart_tip = _make_depart_admonition('tip')
-    visit_warning = visit_admonition
+    visit_warning = _visit_admonition
     depart_warning = _make_depart_admonition('warning')
 
     def visit_versionmodified(self, node):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.