File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -235,21 +235,13 @@ def get_class_variables(cls: type) -> OrderedDict:
235235 if token ['token' ].strip () == '' :
236236 continue
237237
238- # Extract multiline comments in triple quote
239- if (class_variable is not None
240- and token ['token_type' ] == tokenize .STRING
241- and token ['token' ][:3 ] in {'"""' , "'''" }):
242- sep = ' ' if variable_to_comment [class_variable ]['comment' ] else ''
243- variable_to_comment [class_variable ]['comment' ] += sep + token ['token' ][3 :- 3 ].strip ()
244- continue
245-
246- # Extract multiline comments in single quote
238+ # Extract multiline comments
247239 if (class_variable is not None
248240 and token ['token_type' ] == tokenize .STRING
249241 and token ['token' ][:1 ] in {'"' , "'" }):
250242 sep = ' ' if variable_to_comment [class_variable ]['comment' ] else ''
251- variable_to_comment [ class_variable ][ 'comment' ] += sep + token ['token' ][1 : - 1 ]. strip ()
252- continue
243+ quote_char = token ['token' ][: 1 ]
244+ variable_to_comment [ class_variable ][ 'comment' ] += sep + token [ 'token' ]. strip ( quote_char ). strip ()
253245
254246 # Match class variable
255247 class_variable = None
You can’t perform that action at this time.
0 commit comments