]> jfr.im git - yt-dlp.git/blobdiff - test/test_post_hooks.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / test / test_post_hooks.py
index e84a08f2958ad90cfe0fd4242686229c1206a935..6500dd3863deb3ce3d978aed8a20db8cf301f1d2 100644 (file)
@@ -1,13 +1,15 @@
 #!/usr/bin/env python3
+
+# Allow direct execution
 import os
 import sys
 import unittest
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
-from test.helper import get_params, is_download_test, try_rm
 
-import yt_dlp.YoutubeDL
+from test.helper import get_params, is_download_test, try_rm
+import yt_dlp.YoutubeDL  # isort: split
 from yt_dlp.utils import DownloadError
 
 
@@ -57,7 +59,7 @@ def hook_two(self, filename):
 
     def hook_three(self, filename):
         self.files.append(filename)
-        raise Exception('Test exception for \'%s\'' % filename)
+        raise Exception(f'Test exception for \'{filename}\'')
 
     def tearDown(self):
         for f in self.files: