@@ -267,33 +267,31 @@ def create_snippet(self, parsed_attributes):
267
267
continue
268
268
269
269
if attribute_type is 'arguments' :
270
- snippet += 'Arguments :\n '
270
+ snippet += '\n Arguments :\n '
271
271
for attribute in attributes :
272
272
snippet += '\t ' + attribute
273
273
snippet += ' {${' + str (next (tab_index )) + ':[type]}} --'
274
274
snippet += ' ${' + str (next (tab_index )) + ':[description]}\n '
275
275
elif attribute_type is 'keyword_arguments' :
276
- snippet += 'Keyword Arguments:\n '
276
+ snippet += '\n Keyword Arguments:\n '
277
277
for attribute in attributes :
278
278
snippet += '\t ' + attribute
279
279
snippet += ' {${' + str (next (tab_index )) + ':[type]}} --'
280
280
snippet += ' ${' + str (next (tab_index )) + ':[description]}'
281
281
snippet += ' (default ${' + str (next (tab_index )) + '})\n '
282
282
elif attribute_type is 'returns' :
283
- returns_snippet = ''
283
+ snippet + = 'Returns: \n \t '
284
284
if isinstance (attribute , {}):
285
- returns_snippet += '${' + str (next (tab_index )) + ':[type]}'
285
+ snippet += '${' + str (next (tab_index )) + ':[type]}'
286
286
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 '
292
289
elif attribute_type is 'extends' :
290
+ snippet += '\n Extends:\n \t '
293
291
for attribute in attributes :
294
- snippet += '@extends ' + attribute + '\n '
292
+ snippet += attribute + '\n '
295
293
elif attribute_type is 'variables' :
296
- snippet += 'Variables :\n '
294
+ snippet += '\n Variables :\n '
297
295
for attribute in attributes :
298
296
snippet += '\t @var ' + attribute
299
297
snippet += ' ${' + str (next (tab_index )) + ':[type]}'
@@ -359,7 +357,7 @@ def get_definition_contents(cls, view, position):
359
357
Returns:
360
358
{String} Contents that matter
361
359
"""
362
- return view . line ( view . line ( position ). end () + 1 )
360
+ pass
363
361
364
362
def parse (self , line , contents ):
365
363
"""Central command to parse the areas above and below the docstring.
@@ -376,7 +374,7 @@ def parse(self, line, contents):
376
374
"""
377
375
# At beginning of the module
378
376
if not line :
379
- return ''
377
+ return self . parse_module ( contents )
380
378
381
379
output = self .parse_class (line , contents )
382
380
if output is not None :
0 commit comments