]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/postprocessor/movefilesafterdownload.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / postprocessor / movefilesafterdownload.py
index 23b09248c28cdfe2287d0cc945d6ff18d9620eeb..35e87051b4254039fede78a2b7757aa9603aadb9 100644 (file)
@@ -34,16 +34,15 @@ def run(self, info):
             if os.path.abspath(encodeFilename(oldfile)) == os.path.abspath(encodeFilename(newfile)):
                 continue
             if not os.path.exists(encodeFilename(oldfile)):
-                self.report_warning('File "%s" cannot be found' % oldfile)
+                self.report_warning(f'File "{oldfile}" cannot be found')
                 continue
             if os.path.exists(encodeFilename(newfile)):
                 if self.get_param('overwrites', True):
-                    self.report_warning('Replacing existing file "%s"' % newfile)
+                    self.report_warning(f'Replacing existing file "{newfile}"')
                     os.remove(encodeFilename(newfile))
                 else:
                     self.report_warning(
-                        'Cannot move file "%s" out of temporary directory since "%s" already exists. '
-                        % (oldfile, newfile))
+                        f'Cannot move file "{oldfile}" out of temporary directory since "{newfile}" already exists. ')
                     continue
             make_dir(newfile, PostProcessingError)
             self.to_screen(f'Moving file "{oldfile}" to "{newfile}"')