rlaphoenix / pvsfunc

Consider using f-strings PYL-C0209
Performance
Minor
a year agoa year old
Formatting a regular string which could be a f-string
114            original_fps = video_track.original_frame_rate
115        subprocess.check_output([
116            "mkvmerge", "--output", out_path,
117            "--default-duration", "%d:%sfps" % (video_track.track_id - 1, original_fps),118            file_path
119        ], cwd=file_path.parent)
120        return out_path
Formatting a regular string which could be a f-string
109            # TODO: could be untrusted, user might just make a file named this
110            return out_path
111        if video_track.framerate_original_num and video_track.framerate_original_den:
112            original_fps = "%s/%s" % (video_track.framerate_original_num, video_track.framerate_original_den)113        else:
114            original_fps = video_track.original_frame_rate
115        subprocess.check_output([
Formatting a regular string which could be a f-string
96                    prop_src=core.vivtc.VDecimate(clip, cycle=cycle, dryrun=True)
97                )
98            return core.vivtc.VDecimate(clip, cycle=cycle)
99        raise ValueError("pvsfunc.decimate: Incorrect mode (%d), it must be an int value between 0-1" % mode)
Formatting a regular string which could be a f-string
86                    functools.partial(
87                        lambda n, f, c: core.text.Text(
88                            c,
89                            " mode=%d cycle=%d \n"90                            " Important: Please consider another mode. More information: git.io/avoid-tdecimate. \n"
91                            " decimated_frame=%s \n" % (mode, cycle, f.props['VDecimateDrop'] == 1),
92                            alignment=1
Formatting a regular string which could be a f-string
71                            " mode=%d cycle=%d offsets=%s fps=%d/%d \n" % (
72                                mode, cycle, offsets, res.fps.numerator, res.fps.denominator
73                            ) +
74                            " offset=%d decimate=%s \n" % (n % cycle, (n % cycle) not in offsets),75                            alignment=1
76                        ),
77                        c=clip