File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 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:
213213 if (class_variable is not None
214214 and token ['token_type' ] == tokenize .STRING
215215 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 ''
217217 variable_to_comment [class_variable ]['comment' ] += sep + token ['token' ][3 :- 3 ].strip ()
218218
219219 # Match class variable
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ def func(self):
215215 class_variables = OrderedDict ()
216216 class_variables ['arg_1' ] = {'comment' : 'Arg 1 comment' }
217217 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' }
219219 self .assertEqual (get_class_variables (CommentedVariable ), class_variables )
220220
221221 def test_bad_spacing_multiline (self ):
@@ -237,7 +237,7 @@ class TrickyMultiline:
237237 """
238238
239239 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!!'
241241 class_variables ['foo' ] = {'comment' : comment }
242242 self .assertEqual (get_class_variables (TrickyMultiline ), class_variables )
243243
@@ -254,9 +254,9 @@ def test_functions_with_docs_multiline(self):
254254 class FunctionsWithDocs :
255255 i : int = 0
256256
257- def f ():
257+ def f (self ):
258258 """Function"""
259- a : str = 0
259+ a : str = 'hello'
260260 """with docs"""
261261
262262 class_variables = OrderedDict ()
You can’t perform that action at this time.
0 commit comments