@@ -28,14 +28,19 @@ def subprocess_helper(args, cwd):
2828 """Subprocess helper used to 'tee' the output to: console and capture"""
2929
3030 def read_available (proc , stdout , stderr ):
31- """ Read the available output from the process and return it """
31+ """Read the available output from the process and return it"""
32+
3233 def capture_stream (stream , lines ):
33- """ Capture output from a stream, printing to console if needed """
34+ """Capture output from a stream, printing to console if needed"""
3435 new_lines = stream .readlines ()
3536 lines [stream ].extend (new_lines )
3637 if "-s" in sys .argv or "--capture=no" in sys .argv :
3738 for line in new_lines :
38- print (line , end = "" , file = (sys .stdout if stream == stdout else sys .stderr ))
39+ print (
40+ line ,
41+ end = "" ,
42+ file = (sys .stdout if stream == stdout else sys .stderr ),
43+ )
3944
4045 lines = {stdout : [], stderr : []}
4146 while proc .poll () is None :
@@ -109,7 +114,11 @@ def assert_process_success(data_object, errors_ok=False, targets=None):
109114 assert not stderr or errors_ok , f"CMake generated errors:\n { '' .join (stderr )} "
110115
111116 targets = data_object ["targets" ].keys () if targets is None else targets
112- filtered = [(target , output ) for target , output in data_object ["targets" ].items () if target in targets ]
117+ filtered = [
118+ (target , output )
119+ for target , output in data_object ["targets" ].items ()
120+ if target in targets
121+ ]
113122
114123 for target , output in filtered :
115124 return_code , stdout , stderr = output
0 commit comments