1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 22:55:18 +00:00

[cleanup] Consistent style for file heads

This commit is contained in:
pukkandan
2022-06-24 16:36:16 +05:30
parent ac66811112
commit 54007a45f1
55 changed files with 143 additions and 56 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,6 +7,7 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import copy
import json
import urllib.error

View File

@@ -1,12 +1,16 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import re
import sys
import tempfile
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import re
import tempfile
from yt_dlp.utils import YoutubeDLCookieJar

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,6 +7,7 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import base64
from yt_dlp.aes import (

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,8 +7,8 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import is_download_test, try_rm
from test.helper import is_download_test, try_rm
from yt_dlp import YoutubeDL

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# Allow direct execution
import collections
import os
import sys
import unittest
@@ -8,8 +8,9 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import gettestcases
import collections
from test.helper import gettestcases
from yt_dlp.extractor import FacebookIE, YoutubeIE, gen_extractors

View File

@@ -1,15 +1,16 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import shutil
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL
import shutil
from test.helper import FakeYDL
from yt_dlp.cache import Cache

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -8,10 +9,10 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import hashlib
import http.client
import json
import socket
import urllib.error
import http.client
from test.helper import (
assertGreaterEqual,
@@ -23,6 +24,7 @@ from test.helper import (
report_warning,
try_rm,
)
import yt_dlp.YoutubeDL # isort: split
from yt_dlp.compat import compat_HTTPError
from yt_dlp.extractor import get_info_extractor

View File

@@ -1,17 +1,18 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
import unittest
import http.server
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import http.server
import re
import threading
from test.helper import http_server_port, try_rm
from test.helper import http_server_port, try_rm
from yt_dlp import YoutubeDL
from yt_dlp.downloader.http import HttpFD
from yt_dlp.utils import encodeFilename

View File

@@ -1,12 +1,16 @@
#!/usr/bin/env python3
import contextlib
# Allow direct execution
import os
import subprocess
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import contextlib
import subprocess
from yt_dlp.utils import encodeArgument
rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View File

@@ -1,18 +1,19 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
import unittest
import http.server
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import http.server
import ssl
import threading
import urllib.request
from test.helper import http_server_port
from test.helper import http_server_port
from yt_dlp import YoutubeDL
TEST_DIR = os.path.dirname(os.path.abspath(__file__))

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,8 +7,8 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL, is_download_test
from test.helper import FakeYDL, is_download_test
from yt_dlp.extractor import IqiyiIE

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,6 +7,7 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from yt_dlp.jsinterp import JSInterpreter

View File

@@ -1,3 +1,6 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
import unittest

View File

@@ -1,11 +1,15 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import subprocess
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import subprocess
from test.helper import is_download_test, try_rm
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View 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

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,6 +7,7 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from yt_dlp import YoutubeDL
from yt_dlp.compat import compat_shlex_quote
from yt_dlp.postprocessor import (

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,6 +7,7 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import random
import subprocess
import urllib.request

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# Allow direct execution
import contextlib
import os
import sys
import unittest
@@ -8,7 +8,7 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Various small unit tests
import contextlib
import io
import itertools
import json

View File

@@ -1,11 +1,15 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import subprocess
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import subprocess
rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,11 +7,12 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import xml.etree.ElementTree
from test.helper import get_params, is_download_test, try_rm
import yt_dlp.extractor
import yt_dlp.YoutubeDL
from test.helper import get_params, is_download_test, try_rm
class YoutubeDL(yt_dlp.YoutubeDL):

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys
@@ -6,8 +7,8 @@ import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL, is_download_test
from test.helper import FakeYDL, is_download_test
from yt_dlp.extractor import YoutubeIE, YoutubeTabIE

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Allow direct execution
import os
import sys

View File

@@ -1,17 +1,19 @@
#!/usr/bin/env python3
# Allow direct execution
import contextlib
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import contextlib
import re
import string
import urllib.request
from test.helper import FakeYDL, is_download_test
from test.helper import FakeYDL, is_download_test
from yt_dlp.compat import compat_str
from yt_dlp.extractor import YoutubeIE
from yt_dlp.jsinterp import JSInterpreter