Use new style python classes

This commit is contained in:
Takeshi KOMIYA
2016-09-10 15:36:57 +09:00
parent 1d7c82b3bb
commit 9feebd01d1
6 changed files with 6 additions and 6 deletions

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:

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:

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

View File

@@ -137,7 +137,7 @@ def autosummary_table_visit_html(self, node):
# -- autodoc integration -------------------------------------------------------
class FakeDirective:
class FakeDirective(object):
env = {}
genopt = Options()

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)

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."""