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:
235
235
if token ['token' ].strip () == '' :
236
236
continue
237
237
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
247
239
if (class_variable is not None
248
240
and token ['token_type' ] == tokenize .STRING
249
241
and token ['token' ][:1 ] in {'"' , "'" }):
250
242
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 ()
253
245
254
246
# Match class variable
255
247
class_variable = None
You can’t perform that action at this time.
0 commit comments