mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-06 09:20:27 +00:00
Move include path to base object
This commit is contained in:
parent
d30fa32762
commit
61db34a4d6
@ -124,6 +124,18 @@ class PythonMapperBase(object):
|
||||
slug = re.sub(r'[^\w\.]+', '-', slug).strip('-')
|
||||
return os.path.join(*slug.split('.'))
|
||||
|
||||
@property
|
||||
def include_path(self):
|
||||
"""Return 'absolute' path without regarding OS path separator
|
||||
|
||||
This is used in ``toctree`` directives, as Sphinx always expects Unix
|
||||
path separators
|
||||
"""
|
||||
parts = [self.url_root]
|
||||
parts.extend(self.pathname.split(os.path.sep))
|
||||
parts.append('index')
|
||||
return '/'.join(parts)
|
||||
|
||||
@property
|
||||
def ref_type(self):
|
||||
return self.type
|
||||
|
@ -356,18 +356,6 @@ class DotNetPythonMapper(PythonMapperBase):
|
||||
'''Same as above, return the truncated name instead'''
|
||||
return self.ref_name.split('.')[-1]
|
||||
|
||||
@property
|
||||
def include_path(self):
|
||||
"""Return 'absolute' path without regarding OS path separator
|
||||
|
||||
This is used in ``toctree`` directives, as Sphinx always expects Unix
|
||||
path separators
|
||||
"""
|
||||
parts = [self.url_root]
|
||||
parts.extend(self.pathname.split(os.path.sep))
|
||||
parts.append('index')
|
||||
return '/'.join(parts)
|
||||
|
||||
@staticmethod
|
||||
def transform_doc_comments(text):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user