Merge pull request #2948 from tk0miya/use_new_style_classes

Use new style python classes
This commit is contained in:
Takeshi KOMIYA
2016-09-15 02:28:05 +09:00
committed by GitHub
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ import warnings
from docutils import nodes
class translatable:
class translatable(object):
"""Node which supports translation.
The translation goes forward with following steps:
+1 -1
View File
@@ -34,7 +34,7 @@ CONFIG_TYPE_WARNING = "The config value `{name}' has type `{current.__name__}',
"defaults to `{default.__name__}.'"
class ENUM:
class ENUM(object):
"""represents the config value should be a one of candidates.
Example:
+1 -1
View File
@@ -92,7 +92,7 @@ class NoUri(Exception):
pass
class BuildEnvironment:
class BuildEnvironment(object):
"""
The environment in which the ReST files are translated.
Stores an inventory of cross-file targets and provides doctree
+1 -1
View File
@@ -137,7 +137,7 @@ def autosummary_table_visit_html(self, node):
# -- autodoc integration -------------------------------------------------------
class FakeDirective:
class FakeDirective(object):
env = {}
genopt = Options()
+1 -1
View File
@@ -33,7 +33,7 @@ pydriver = driver.Driver(pygrammar, convert=nodes.convert)
# an object with attributes corresponding to token and symbol names
class sym:
class sym(object):
pass
for k, v in iteritems(pygrammar.symbol2number):
setattr(sym, k, v)
+1 -1
View File
@@ -55,7 +55,7 @@ if PY3:
return text_type(tree)
from html import escape as htmlescape # noqa: >= Python 3.2
class UnicodeMixin:
class UnicodeMixin(object):
"""Mixin class to handle defining the proper __str__/__unicode__
methods in Python 2 or 3."""