1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-15 22:05:39 +00:00

Use compat_[filter,map]

This commit is contained in:
dirkf 2023-01-28 18:21:33 +00:00 committed by GitHub
parent e48a9ae20e
commit 93c7531412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,8 @@ import re
import youtube_dl.YoutubeDL
from youtube_dl.compat import (
compat_filter as filter,
compat_map as map,
compat_http_client,
compat_urllib_error,
compat_HTTPError,
@ -279,12 +281,6 @@ for n, test_case in enumerate(defs):
ie_list = ','.join(test_case.get('add_ie', []))
TestDownload.addTest(test_method, tname, ie_list)
# Py2 compat (should be in compat.py?)
try:
from itertools import (ifilter as filter, imap as map)
except ImportError:
pass
def tests_for_ie(ie_key):
return filter(