@@ -89,9 +89,9 @@ def __call__(self, input: Dict, file_prefix: str):
8989 images_in_folder = len (list (parent .glob (ext )))
9090 nb_frames = input ["last_frame" ] - input ["frame_skip" ]
9191
92- assert (
93- images_in_folder == nb_frames
94- ), f"input folder contains { images_in_folder } images, { nb_frames } were expected"
92+ assert images_in_folder == nb_frames , (
93+ f"input folder contains { images_in_folder } images, { nb_frames } were expected"
94+ )
9595
9696 input_info = [
9797 "-pattern_type" ,
@@ -122,9 +122,9 @@ def __call__(self, input: Dict, file_prefix: str):
122122
123123 # Use existing YUV (if found and indicated for use):
124124 if self .use_yuv :
125- assert (
126- yuv_file is not None
127- ), "Parameter 'use_yuv' set True but YUV file not found."
125+ assert yuv_file is not None , (
126+ "Parameter 'use_yuv' set True but YUV file not found."
127+ )
128128 size = yuv_file .stat ().st_size
129129 bytes_per_luma_sample = {"yuv420p" : 1.5 }[chroma_format ]
130130 bytes_per_sample = (input_bitdepth + 7 ) >> 3
@@ -135,9 +135,9 @@ def __call__(self, input: Dict, file_prefix: str):
135135 * bytes_per_sample
136136 * nb_frames
137137 )
138- assert (
139- size == expected_size
140- ), f"YUV found for input but expected size of { expected_size } bytes differs from actual size of { size } bytes"
138+ assert size == expected_size , (
139+ f"YUV found for input but expected size of { expected_size } bytes differs from actual size of { size } bytes"
140+ )
141141 shutil .copy (yuv_file , yuv_in_path )
142142 print (f"Using pre-existing YUV file: { yuv_file } " )
143143 return (yuv_in_path , nb_frames , frame_width , frame_height , file_prefix )
@@ -204,9 +204,9 @@ def __call__(
204204 frame_width = video_info ["width" ]
205205 frame_height = video_info ["height" ]
206206
207- assert (
208- "420" in video_info [" format" ]. value
209- ), f"Only support yuv420, but got { video_info [ 'format' ] } "
207+ assert "420" in video_info [ "format" ]. value , (
208+ f"Only support yuv420, but got { video_info [' format' ] } "
209+ )
210210 pix_fmt_suffix = "10le" if video_info ["bitdepth" ] == 10 else ""
211211 chroma_format = "yuv420p"
212212
0 commit comments