@@ -116,7 +116,6 @@ def test_get_git_url_no_remote(self) -> None:
116
116
117
117
def test_get_git_version (self ) -> None :
118
118
git_version = self .git_info .get_git_version ()
119
- self .assertEqual (len (git_version ), 3 )
120
119
self .assertIsInstance (git_version , tuple )
121
120
for v in git_version :
122
121
self .assertIsInstance (v , int )
@@ -245,9 +244,7 @@ class TypedVariable:
245
244
246
245
def test_separated_variables (self ):
247
246
class SeparatedVariable :
248
- """Comment
249
-
250
- """
247
+ """Comment"""
251
248
252
249
arg_1 : str
253
250
@@ -263,9 +260,7 @@ def func(self):
263
260
264
261
def test_commented_variables (self ):
265
262
class CommentedVariable :
266
- """Comment
267
-
268
- """
263
+ """Comment"""
269
264
270
265
arg_1 : str # Arg 1 comment
271
266
@@ -286,10 +281,10 @@ def func(self):
286
281
287
282
def test_bad_spacing_multiline (self ):
288
283
class TrickyMultiline :
289
- """ This is really difficult
284
+ """This is really difficult
290
285
291
- so
292
- so very difficult
286
+ so
287
+ so very difficult
293
288
"""
294
289
295
290
foo : str = "my" # Header line
@@ -322,36 +317,28 @@ class TripleQuoteMultiline:
322
317
def test_comments_with_quotes (self ):
323
318
class MultiquoteMultiline :
324
319
bar : int = 0
325
- ' \' \' biz baz\' '
320
+ "'' biz baz'"
326
321
327
322
hi : str
328
- " \" Hello there\" \" "
323
+ '" Hello there""'
329
324
330
325
class_variables = {}
331
- class_variables [' bar' ] = {' comment' : "''biz baz'" }
332
- class_variables ['hi' ] = {' comment' : '"Hello there""' }
326
+ class_variables [" bar" ] = {" comment" : "''biz baz'" }
327
+ class_variables ["hi" ] = {" comment" : '"Hello there""' }
333
328
self .assertEqual (get_class_variables (MultiquoteMultiline ), class_variables )
334
329
335
330
def test_multiline_argument (self ):
336
331
class MultilineArgument :
337
- bar : str = (
338
- "This is a multiline argument"
339
- " that should not be included in the docstring"
340
- )
332
+ bar : str = "This is a multiline argument" " that should not be included in the docstring"
341
333
"""biz baz"""
342
334
343
335
class_variables = {"bar" : {"comment" : "biz baz" }}
344
336
self .assertEqual (get_class_variables (MultilineArgument ), class_variables )
345
337
346
338
def test_multiline_argument_with_final_hashtag_comment (self ):
347
339
class MultilineArgumentWithHashTagComment :
348
- bar : str = (
349
- "This is a multiline argument"
350
- " that should not be included in the docstring"
351
- ) # biz baz
352
- barr : str = (
353
- "This is a multiline argument"
354
- " that should not be included in the docstring" ) # bar baz
340
+ bar : str = "This is a multiline argument" " that should not be included in the docstring" # biz baz
341
+ barr : str = "This is a multiline argument" " that should not be included in the docstring" # bar baz
355
342
barrr : str = ( # meow
356
343
"This is a multiline argument" # blah
357
344
" that should not be included in the docstring" # grrrr
@@ -563,7 +550,7 @@ def test_python_object_encoder_complex(self):
563
550
564
551
def test_python_object_encoder_unpicklable (self ):
565
552
class CannotPickleThis :
566
- """Da na na na. Can't pickle this. """
553
+ """Da na na na. Can't pickle this."""
567
554
568
555
def __init__ (self ):
569
556
self .x = 1
0 commit comments