Rename base objects to be more descriptive.

pull/9/head
Eric Holscher 9 years ago
parent a3244a2531
commit 057100b1ee

@ -9,7 +9,7 @@ from sphinx.util.osutil import ensuredir
from ..settings import TEMPLATE_DIR
class AutoAPIBase(object):
class PythonMapperBase(object):
language = 'base'
type = 'base'
@ -48,9 +48,9 @@ class AutoAPIBase(object):
def __lt__(self, other):
'''Object sorting comparison'''
if isinstance(other, AutoAPIBase):
if isinstance(other, PythonMapperBase):
return self.id < other.id
return super(AutoAPIBase, self).__lt__(other)
return super(PythonMapperBase, self).__lt__(other)
def __str__(self):
return '<{cls} {id}>'.format(cls=self.__class__.__name__,
@ -76,9 +76,9 @@ class AutoAPIBase(object):
return '.'.join(pieces)
class AutoAPIDomain(object):
class SphinxMapperBase(object):
'''Base class for domain handling
'''Base class for mapping `PythonMapperBase` objects to Sphinx.
:param app: Sphinx application instance
'''

@ -1,15 +1,12 @@
import os
from collections import defaultdict
import yaml
from sphinx.util.osutil import ensuredir
from .base import AutoAPIBase, AutoAPIDomain
from .base import PythonMapperBase, SphinxMapperBase
MADE = set()
class DotNetDomain(AutoAPIDomain):
class DotNetDomain(SphinxMapperBase):
'''Auto API domain handler for .NET
@ -165,7 +162,7 @@ class DotNetDomain(AutoAPIDomain):
# top_level_file.write(content.render(pages=self.namespaces.values()))
class DotNetBase(AutoAPIBase):
class DotNetBase(PythonMapperBase):
'''Base .NET object representation'''

@ -1,10 +1,10 @@
import json
import subprocess
from .base import AutoAPIBase, AutoAPIDomain
from .base import PythonMapperBase, SphinxMapperBase
class GoDomain(AutoAPIDomain):
class GoDomain(SphinxMapperBase):
'''Auto API domain handler for Go
@ -89,7 +89,7 @@ class GoDomain(AutoAPIDomain):
yield obj
class GoBase(AutoAPIBase):
class GoBase(PythonMapperBase):
language = 'go'
inverted_names = False

@ -1,12 +1,11 @@
import os
import json
import subprocess
from .base import AutoAPIBase, AutoAPIDomain
from .base import PythonMapperBase, SphinxMapperBase
class JavaScriptDomain(AutoAPIDomain):
class JavaScriptDomain(SphinxMapperBase):
'''Auto API domain handler for Javascript
@ -73,7 +72,7 @@ class JavaScriptDomain(AutoAPIDomain):
yield obj
class JavaScriptBase(AutoAPIBase):
class JavaScriptBase(PythonMapperBase):
language = 'javascript'

@ -2,10 +2,10 @@ from collections import defaultdict
from epyparse import parsed
from .base import AutoAPIBase, AutoAPIDomain
from .base import PythonMapperBase, SphinxMapperBase
class PythonDomain(AutoAPIDomain):
class PythonDomain(SphinxMapperBase):
'''Auto API domain handler for Python
@ -60,7 +60,7 @@ class PythonDomain(AutoAPIDomain):
yield obj
class PythonBase(AutoAPIBase):
class PythonBase(PythonMapperBase):
language = 'python'

Loading…
Cancel
Save