File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def get_class_variables(cls: type) -> OrderedDict:
213
213
if (class_variable is not None
214
214
and token ['token_type' ] == tokenize .STRING
215
215
and token ['token' ][:3 ] in {'"""' , "'''" }):
216
- sep = '\n \n ' if variable_to_comment [class_variable ]['comment' ] else ''
216
+ sep = ' ' if variable_to_comment [class_variable ]['comment' ] else ''
217
217
variable_to_comment [class_variable ]['comment' ] += sep + token ['token' ][3 :- 3 ].strip ()
218
218
219
219
# Match class variable
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ def func(self):
215
215
class_variables = OrderedDict ()
216
216
class_variables ['arg_1' ] = {'comment' : 'Arg 1 comment' }
217
217
class_variables ['arg_2' ] = {'comment' : 'Arg 2 comment' }
218
- class_variables ['arg_3' ] = {'comment' : 'Poorly formatted comment\n \n More comment' }
218
+ class_variables ['arg_3' ] = {'comment' : 'Poorly formatted comment More comment' }
219
219
self .assertEqual (get_class_variables (CommentedVariable ), class_variables )
220
220
221
221
def test_bad_spacing_multiline (self ):
@@ -237,7 +237,7 @@ class TrickyMultiline:
237
237
"""
238
238
239
239
class_variables = OrderedDict ()
240
- comment = 'Header line\n \n Footer \n T\n A\n P\n \n multi\n line!!'
240
+ comment = 'Header line Footer \n T\n A\n P\n \n multi\n line!!'
241
241
class_variables ['foo' ] = {'comment' : comment }
242
242
self .assertEqual (get_class_variables (TrickyMultiline ), class_variables )
243
243
@@ -254,9 +254,9 @@ def test_functions_with_docs_multiline(self):
254
254
class FunctionsWithDocs :
255
255
i : int = 0
256
256
257
- def f ():
257
+ def f (self ):
258
258
"""Function"""
259
- a : str = 0
259
+ a : str = 'hello'
260
260
"""with docs"""
261
261
262
262
class_variables = OrderedDict ()
You can’t perform that action at this time.
0 commit comments