[cleanup] Remove obsolete Python compatibility code (#17357)

Authored by: doe1080
This commit is contained in:
doe1080
2026-08-25 01:32:13 +00:00
committed by GitHub
parent 81ecd58b13
commit 88a9516584
17 changed files with 43 additions and 118 deletions
+1 -2
View File
@@ -2398,8 +2398,7 @@ class YoutubeDL:
selectors = []
current_selector = None
for type_, string_, start, _, _ in tokens:
# ENCODING is only defined in Python 3.x
if type_ == getattr(tokenize, 'ENCODING', None):
if type_ == tokenize.ENCODING:
continue
elif type_ in [tokenize.NAME, tokenize.NUMBER]:
current_selector = FormatSelector(SINGLE, string_, [])