Basic cleanup on docstrings, import order

pull/78/head
Anthony Johnson 8 years ago
parent 8e97201423
commit a5a34df7f4

@ -124,8 +124,7 @@ class PythonMapperBase(object):
return slug.split('.')[-1]
def include_dir(self, root):
"""Return directory of file
"""
"""Return directory of file"""
return os.path.join(
root,
os.path.dirname(self.path.relative),
@ -278,10 +277,6 @@ class SphinxMapperBase(object):
def output_rst(self, root, source_suffix):
for id, obj in self.objects.items():
# if not obj or not obj.top_level_object:
# print "Skipping {obj} as it isn't a top level object".format(obj=obj)
# continue
rst = obj.render()
if not rst:
continue

@ -1,12 +1,11 @@
import os
from collections import defaultdict
import textwrap
from collections import defaultdict
from pydocstyle.parser import Parser
from .base import PythonMapperBase, SphinxMapperBase
from ..utils import slugify
from pydocstyle.parser import Parser
class PythonSphinxMapper(SphinxMapperBase):
@ -35,11 +34,10 @@ class PythonSphinxMapper(SphinxMapperBase):
return None
def create_class(self, data, options=None, **kwargs):
'''
Create a class from the passed in data
"""Create a class from the passed in data
:param data: dictionary data of pydocstyle output
'''
"""
obj_map = dict((cls.type, cls) for cls
in [PythonClass, PythonFunction, PythonModule, PythonMethod, PythonPackage])
try:

Loading…
Cancel
Save