1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-01 23:25:14 +00:00

[cleanup] Bump ruff to 0.13.x (#14293)

Authored by: bashonly
This commit is contained in:
bashonly
2025-09-11 10:18:01 -05:00
committed by GitHub
parent 22ea0688ed
commit ba80446855
20 changed files with 34 additions and 33 deletions

View File

@@ -1945,7 +1945,7 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/
server_thread.daemon = True
server_thread.start()
(content, urlh) = self.ie._download_webpage_handle(
content, _ = self.ie._download_webpage_handle(
f'http://127.0.0.1:{port}/teapot', None,
expected_status=TEAPOT_RESPONSE_STATUS)
self.assertEqual(content, TEAPOT_RESPONSE_BODY)

View File

@@ -29,7 +29,7 @@ class TestOverwrites(unittest.TestCase):
'-o', 'test.webm',
'https://www.youtube.com/watch?v=jNQXAC9IVRw',
], cwd=root_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
sout, _ = outp.communicate()
self.assertTrue(b'has already been downloaded' in sout)
# if the file has no content, it has not been redownloaded
self.assertTrue(os.path.getsize(download_file) < 1)
@@ -41,7 +41,7 @@ class TestOverwrites(unittest.TestCase):
'-o', 'test.webm',
'https://www.youtube.com/watch?v=jNQXAC9IVRw',
], cwd=root_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
sout, _ = outp.communicate()
self.assertTrue(b'has already been downloaded' not in sout)
# if the file has no content, it has not been redownloaded
self.assertTrue(os.path.getsize(download_file) > 1)

View File

@@ -153,7 +153,7 @@ class TestPoTokenProvider:
with pytest.raises(
PoTokenProviderRejectedRequest,
match='External requests by "example" provider do not support proxy scheme "socks4". Supported proxy '
match=r'External requests by "example" provider do not support proxy scheme "socks4"\. Supported proxy '
'schemes: http, socks5h',
):
provider.request_pot(pot_request)

View File

@@ -22,7 +22,7 @@ class TestVerboseOutput(unittest.TestCase):
'--username', 'johnsmith@gmail.com',
'--password', 'my_secret_password',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
_, serr = outp.communicate()
self.assertTrue(b'--username' in serr)
self.assertTrue(b'johnsmith' not in serr)
self.assertTrue(b'--password' in serr)
@@ -36,7 +36,7 @@ class TestVerboseOutput(unittest.TestCase):
'-u', 'johnsmith@gmail.com',
'-p', 'my_secret_password',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
_, serr = outp.communicate()
self.assertTrue(b'-u' in serr)
self.assertTrue(b'johnsmith' not in serr)
self.assertTrue(b'-p' in serr)
@@ -50,7 +50,7 @@ class TestVerboseOutput(unittest.TestCase):
'--username=johnsmith@gmail.com',
'--password=my_secret_password',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
_, serr = outp.communicate()
self.assertTrue(b'--username' in serr)
self.assertTrue(b'johnsmith' not in serr)
self.assertTrue(b'--password' in serr)
@@ -64,7 +64,7 @@ class TestVerboseOutput(unittest.TestCase):
'-u=johnsmith@gmail.com',
'-p=my_secret_password',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
_, serr = outp.communicate()
self.assertTrue(b'-u' in serr)
self.assertTrue(b'johnsmith' not in serr)
self.assertTrue(b'-p' in serr)