File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import datetime
22import json
33import re
4+ import subprocess
45import sys
56from collections import defaultdict
67from dataclasses import (
1415from functools import singledispatch
1516from inspect import cleandoc
1617from pathlib import Path
17- import subprocess
1818from tempfile import TemporaryDirectory
1919from typing import (
2020 Any ,
@@ -100,6 +100,7 @@ class Report:
100100 security : Rating
101101 technical_debt : Rating
102102
103+
103104def total_coverage (file : Union [str , Path ]) -> float :
104105 with TemporaryDirectory () as tmpdir :
105106 tmp_dir = Path (tmpdir )
@@ -113,11 +114,11 @@ def total_coverage(file: Union[str, Path]) -> float:
113114 stdout = p .stdout .strip ()
114115 if (p .returncode == 1 ) and (stdout == "No data to report." ):
115116 print (
116- f' The following command'
117- f' returned non-zero exit status { p .returncode } :\n '
117+ f" The following command"
118+ f" returned non-zero exit status { p .returncode } :\n "
118119 f' { " " .join (p .args )} \n '
119- f' { stdout } \n '
120- ' Returning total coverage 100 %.' ,
120+ f" { stdout } \n "
121+ " Returning total coverage 100 %." ,
121122 file = sys .stderr ,
122123 )
123124 return 100.0
You can’t perform that action at this time.
0 commit comments