Revision: 7805
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7805&view=rev
Author:   mdboom
Date:     2009-09-21 12:07:15 +0000 (Mon, 21 Sep 2009)

Log Message:
-----------
Fix warnings about math_symbol_table.py

Modified Paths:
--------------
    trunk/matplotlib/doc/sphinxext/math_symbol_table.py

Modified: trunk/matplotlib/doc/sphinxext/math_symbol_table.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/math_symbol_table.py 2009-09-21 12:06:29 UTC 
(rev 7804)
+++ trunk/matplotlib/doc/sphinxext/math_symbol_table.py 2009-09-21 12:07:15 UTC 
(rev 7805)
@@ -128,26 +128,15 @@
     state_machine.insert_input(lines, "Symbol table")
     return []
 
-try:
-    from docutils.parsers.rst import Directive
-except ImportError:
-    from docutils.parsers.rst.directives import _directives
-    def math_symbol_table_directive(name, arguments, options, content, lineno,
-                                    content_offset, block_text, state, 
state_machine):
-        return run(state_machine)
-    math_symbol_table_directive.arguments = None
-    math_symbol_table_directive.options = {}
-    math_symbol_table_directive.content = False
-    _directives['math_symbol_table'] = math_symbol_table_directive
-else:
-    class math_symbol_table_directive(Directive):
-        has_content = False
-        def run(self):
-            return run(self.state_machine)
-    from docutils.parsers.rst import directives
-    directives.register_directive('math_symbol_table',
-                                  math_symbol_table_directive)
+def math_symbol_table_directive(name, arguments, options, content, lineno,
+                                content_offset, block_text, state, 
state_machine):
+    return run(state_machine)
 
+def setup(app):
+    app.add_directive(
+        'math_symbol_table', math_symbol_table_directive,
+        False, (0, 1, 0))
+
 if __name__ == "__main__":
     # Do some verification of the tables
     from matplotlib import _mathtext_data


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to