@@ -481,7 +481,7 @@ def update_coverage(coverage, path, func, line, status):
481
481
# subelements of the goal in CBMC's xml or json coverage output.
482
482
483
483
def parse_lines (string ):
484
- "Extract line numbers from the string encoding of line numbers used in coverage output"
484
+ """ Extract line numbers from the string encoding of line numbers used in coverage output"" "
485
485
486
486
# string is an encoding of a set of line numbers like
487
487
# "1,3,6" -> {1, 3, 6}
@@ -492,15 +492,14 @@ def parse_lines(string):
492
492
bounds = group .split ('-' )
493
493
if len (bounds ) == 1 :
494
494
lines .add (int (bounds [0 ]))
495
- continue
496
- if len (bounds ) == 2 :
495
+ elif len (bounds ) == 2 :
497
496
lines .update (range (int (bounds [0 ]), int (bounds [1 ])+ 1 ))
498
- continue
499
- raise UserWarning (f"Unexpected encoding of line numbers: { string } " )
497
+ else :
498
+ raise UserWarning (f"Unexpected encoding of line numbers: { string } " )
500
499
return sorted (lines )
501
500
502
501
def parse_description (description ):
503
- "Extract basic block source lines from a coverage goal's textual description"
502
+ """ Extract basic block source lines from a coverage goal's textual description"" "
504
503
505
504
try :
506
505
# description is "block N (lines BASIC_BLOCK)"
@@ -526,7 +525,7 @@ def parse_description(description):
526
525
raise UserWarning (f'Unexpected coverage goal description: "{ description } "' ) from error
527
526
528
527
def parse_basic_block_lines (basic_block_lines ):
529
- "Extract basic block source lines from a coverage goal's xml subelement"
528
+ """ Extract basic block source lines from a coverage goal's xml subelement"" "
530
529
531
530
if basic_block_lines is None :
532
531
return []
@@ -548,7 +547,7 @@ def parse_basic_block_lines(basic_block_lines):
548
547
raise UserWarning (f'Unexpected coverage goal xml data: "{ basic_block_lines } "' ) from error
549
548
550
549
def parse_basicBlockLines (basicBlockLines ): # pylint: disable=invalid-name
551
- "Extract basic block source lines from a coverage goal's json data"
550
+ """ Extract basic block source lines from a coverage goal's json data"" "
552
551
553
552
if basicBlockLines is None :
554
553
return []
0 commit comments