Skip to content

Commit 1e50f18

Browse files
committed
BUGFIX Add whitespace between all sections of documentation
1 parent 7f1ac98 commit 1e50f18

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

DocblockrPython.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -267,33 +267,31 @@ def create_snippet(self, parsed_attributes):
267267
continue
268268

269269
if attribute_type is 'arguments':
270-
snippet += 'Arguments:\n'
270+
snippet += '\nArguments:\n'
271271
for attribute in attributes:
272272
snippet += '\t' + attribute
273273
snippet += ' {${' + str(next(tab_index)) + ':[type]}} --'
274274
snippet += ' ${' + str(next(tab_index)) + ':[description]}\n'
275275
elif attribute_type is 'keyword_arguments':
276-
snippet += 'Keyword Arguments:\n'
276+
snippet += '\nKeyword Arguments:\n'
277277
for attribute in attributes:
278278
snippet += '\t' + attribute
279279
snippet += ' {${' + str(next(tab_index)) + ':[type]}} --'
280280
snippet += ' ${' + str(next(tab_index)) + ':[description]}'
281281
snippet += ' (default ${' + str(next(tab_index)) + '})\n'
282282
elif attribute_type is 'returns':
283-
returns_snippet = ''
283+
snippet += 'Returns:\n\t'
284284
if isinstance(attribute, {}):
285-
returns_snippet += '${' + str(next(tab_index)) + ':[type]}'
285+
snippet += '${' + str(next(tab_index)) + ':[type]}'
286286
else:
287-
returns_snippet += attribute
288-
289-
returns_snippet += ' ${' + str(next(tab_index)) + ':[description]}'
290-
291-
snippet += 'Returns:\n\t' + returns_snippet + '\n'
287+
snippet += attribute
288+
snippet += ' ${' + str(next(tab_index)) + ':[description]}\n'
292289
elif attribute_type is 'extends':
290+
snippet += '\nExtends:\n\t'
293291
for attribute in attributes:
294-
snippet += '@extends ' + attribute + '\n'
292+
snippet += attribute + '\n'
295293
elif attribute_type is 'variables':
296-
snippet += 'Variables:\n'
294+
snippet += '\nVariables:\n'
297295
for attribute in attributes:
298296
snippet += '\t@var ' + attribute
299297
snippet += ' ${' + str(next(tab_index)) + ':[type]}'
@@ -359,7 +357,7 @@ def get_definition_contents(cls, view, position):
359357
Returns:
360358
{String} Contents that matter
361359
"""
362-
return view.line(view.line(position).end() + 1)
360+
pass
363361

364362
def parse(self, line, contents):
365363
"""Central command to parse the areas above and below the docstring.
@@ -376,7 +374,7 @@ def parse(self, line, contents):
376374
"""
377375
# At beginning of the module
378376
if not line:
379-
return ''
377+
return self.parse_module(contents)
380378

381379
output = self.parse_class(line, contents)
382380
if output is not None:

0 commit comments

Comments
 (0)