1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-09 23:08:32 +00:00

Update _utils.py

Resolve additional ruff errors.
This commit is contained in:
Alan Xiao 2025-04-23 20:23:13 -04:00 committed by GitHub
parent 6880a50671
commit 2a9b19d8db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,13 +168,13 @@ def IDENTITY(x):
NUMBER_RE = r'\d+(?:\.\d+)?' NUMBER_RE = r'\d+(?:\.\d+)?'
WINDOWS_RESERVED_NAMES = ( WINDOWS_RESERVED_NAMES = (
("CON", "CONOUT$", "CONIN$", "PRN", "AUX", "CLOCK$", "NUL") 'CON', 'CONOUT$', 'CONIN$', 'PRN', 'AUX', 'CLOCK$', 'NUL',
+ tuple(f"{name:s}{num:d}" for name, num in itertools.product(("COM", "LPT"), range(0, 10))) *tuple(f'{name:s}{num:d}' for name, num in itertools.product(('COM', 'LPT'), range(10))),
+ tuple( *tuple(
f"{name:s}{ssd:s}" f'{name:s}{ssd:s}'
for name, ssd in itertools.product( for name, ssd in itertools.product(
("COM", "LPT"), ('COM', 'LPT'),
("\N{SUPERSCRIPT ONE}", "\N{SUPERSCRIPT TWO}", "\N{SUPERSCRIPT THREE}"), ('\N{SUPERSCRIPT ONE}', '\N{SUPERSCRIPT TWO}', '\N{SUPERSCRIPT THREE}'),
) )
) )
) )