]> jfr.im git - yt-dlp.git/commitdiff
[cleanup] Consistent style for file heads
authorpukkandan <redacted>
Fri, 24 Jun 2022 11:06:16 +0000 (16:36 +0530)
committerpukkandan <redacted>
Fri, 24 Jun 2022 18:38:58 +0000 (00:08 +0530)
55 files changed:
devscripts/bash-completion.py
devscripts/fish-completion.py
devscripts/generate_aes_testdata.py
devscripts/make_contributing.py
devscripts/make_issue_template.py
devscripts/make_lazy_extractors.py
devscripts/make_readme.py
devscripts/make_supportedsites.py
devscripts/prepare_manpage.py
devscripts/update-version.py
devscripts/zsh-completion.py
pyinst.py
setup.cfg
setup.py
test/test_InfoExtractor.py
test/test_YoutubeDL.py
test/test_YoutubeDLCookieJar.py
test/test_aes.py
test/test_age_restriction.py
test/test_all_urls.py
test/test_cache.py
test/test_compat.py
test/test_download.py
test/test_downloader_http.py
test/test_execution.py
test/test_http.py
test/test_iqiyi_sdk_interpreter.py
test/test_jsinterp.py
test/test_netrc.py
test/test_overwrites.py
test/test_post_hooks.py
test/test_postprocessors.py
test/test_socks.py
test/test_subtitles.py
test/test_update.py.disabled
test/test_utils.py
test/test_verbose_output.py
test/test_write_annotations.py.disabled
test/test_youtube_lists.py
test/test_youtube_misc.py
test/test_youtube_signature.py
yt_dlp/YoutubeDL.py
yt_dlp/__init__.py
yt_dlp/__main__.py
yt_dlp/compat/__init__.py
yt_dlp/compat/_legacy.py
yt_dlp/compat/compat_utils.py
yt_dlp/cookies.py
yt_dlp/downloader/http.py
yt_dlp/extractor/common.py
yt_dlp/extractor/iwara.py
yt_dlp/extractor/nebula.py
yt_dlp/extractor/shared.py
yt_dlp/extractor/urort.py
yt_dlp/utils.py

index 268e8a2aee8d229ff2f2af3d2ef709e2c14f6738..9b4a9d4e2f4b196158a8f28141c83301776fa76e 100755 (executable)
@@ -1,9 +1,12 @@
 #!/usr/bin/env python3
+
+# Allow direct execution
 import os
 import sys
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
 import yt_dlp
 
 BASH_COMPLETION_FILE = "completions/bash/yt-dlp"
index d9c0048e2399e10cf1f18184737463793ae0a450..5d2f68a489556ffedeb186ea00aa3b122000f775 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/env python3
-import optparse
+
+# Allow direct execution
 import os
 import sys
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
+import optparse
+
 import yt_dlp
 from yt_dlp.utils import shell_quote
 
index c7d83f1a75006bff77f640f73ae9044f749ad4d9..7f3c88bcfbb7704be3f08e05977f93a9604a19cf 100644 (file)
@@ -1,11 +1,15 @@
 #!/usr/bin/env python3
-import codecs
+
+# Allow direct execution
 import os
-import subprocess
 import sys
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
+import codecs
+import subprocess
+
 from yt_dlp.aes import aes_encrypt, key_expansion
 from yt_dlp.utils import intlist_to_bytes
 
index 2562c4fd75c9dd3cc8622fde7906748611fdf32d..a06f8a616e826ab51a32d7d9c76411ff13bc7fc6 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 import optparse
 import re
 
index 5a309008e2eb6f87459a5b970602141935a569e6..54043ef4ee797c3b3d92da91d49ad11ba303110b 100644 (file)
@@ -1,4 +1,12 @@
 #!/usr/bin/env python3
+
+# Allow direct execution
+import os
+import sys
+
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+
 import optparse
 
 
@@ -7,7 +15,7 @@ def read(fname):
         return f.read()
 
 
-# Get the version from yt_dlp/version.py without importing the package
+# Get the version without importing the package
 def read_version(fname):
     exec(compile(read(fname), fname, 'exec'))
     return locals()['__version__']
index 39d4646d015a237337e9515dab1ac912a0bbaa61..785d66a6a162f1c53956f1fd54a1e32fc476005b 100644 (file)
@@ -1,12 +1,15 @@
 #!/usr/bin/env python3
-import optparse
+
+# Allow direct execution
 import os
 import sys
-from inspect import getsource
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
 
+import optparse
+from inspect import getsource
+
 NO_ATTR = object()
 STATIC_CLASS_PROPERTIES = ['IE_NAME', 'IE_DESC', 'SEARCH_KEY', '_WORKING', '_NETRC_MACHINE', 'age_limit']
 CLASS_METHODS = [
index 015212aa36b2bd7663daa58002a5c652033423a8..f2e08d7c6e594ba3d09a2257296d24a6c07006fa 100755 (executable)
@@ -1,7 +1,11 @@
 #!/usr/bin/env python3
 
-# yt-dlp --help | make_readme.py
-# This must be run in a console of correct width
+"""
+yt-dlp --help | make_readme.py
+This must be run in a console of correct width
+"""
+
+
 import functools
 import re
 import sys
index d8c53c5e13041fccad092962edab171235768741..e46f7af565dfaac46b99eb4711df7d4b7ee41b5e 100644 (file)
@@ -1,10 +1,14 @@
 #!/usr/bin/env python3
-import optparse
+
+# Allow direct execution
 import os
 import sys
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
+import optparse
+
 from yt_dlp.extractor import list_extractor_classes
 
 
index 91e9ebcedc8aa7039d48a691682c611194378211..cea934949972f426b84ed384e3cce58881202777 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 import optparse
 import os.path
 import re
@@ -23,7 +24,7 @@
 
 def main():
     parser = optparse.OptionParser(usage='%prog OUTFILE.md')
-    options, args = parser.parse_args()
+    _, args = parser.parse_args()
     if len(args) != 1:
         parser.error('Expected an output filename')
 
index 991cfb2aff0db83a2fcde6c025dc68b7e4f17ccb..c5bc83de93c1f83ca5710f1e761765c557b6de30 100644 (file)
@@ -1,4 +1,12 @@
 #!/usr/bin/env python3
+
+# Allow direct execution
+import os
+import sys
+
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+
 import subprocess
 import sys
 from datetime import datetime
index 59faea06a2feb82cd821e18078f5016ca5d3cd89..267af5f6ec7fad627ef82c018ee8a1c51b6a0ce1 100755 (executable)
@@ -1,9 +1,12 @@
 #!/usr/bin/env python3
+
+# Allow direct execution
 import os
 import sys
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
 import yt_dlp
 
 ZSH_COMPLETION_FILE = "completions/zsh/_yt-dlp"
index 4401125ed52e1ac4932f2b873c9cedf4d5541e8d..a7c1be85d90f7ad5787049d1e1fea9e30bddc7ea 100644 (file)
--- a/pyinst.py
+++ b/pyinst.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 import os
 import platform
 import sys
index 946d7b12230e858cac28f30941b850f15d877dfb..415cca91a8c56b9f9a8bee31b4950b838f7d793f 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -37,3 +37,5 @@ line_length = 80
 reverse_relative = true
 ensure_newline_before_comments = true
 include_trailing_comma = true
+known_first_party =
+    test
index 6dae442aa4d5faea21d70ed58dc9af3b23b39520..9803e928c4bab2b5a094d993f3bc49ba609bcb3f 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 import os.path
 import sys
 import warnings
index f0571c41a92ec94724c04f69240eb43c1858e87f..f57a29ffc7becd1fb0cf808b258d5a94544cb49f 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
index 1153881e946210ae036603c6b1513340bfd27478..44e8f2917b8a89ea32a3e8e10a45b8f35a2defce 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,6 +7,7 @@
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
 import copy
 import json
 import urllib.error
index 6280e1f2cbfabc679162d6d1a5039b818b05cc64..0d4e7dc97c482504e2f3402bdfaee1b48fa62a62 100644 (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
 
 
index 2b7b7cf542636b72439a7ac85704a27e28555023..0372465885b1dad8c9cf4f8c29099ff48c86aa03 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,6 +7,7 @@
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
 import base64
 
 from yt_dlp.aes import (
index e1012f69bb36dfee59aa0ea5d32f7334e0928185..ff248432b9ca070151f95816e1e26b0c2daa9023 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,8 +7,8 @@
 
 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
 
 
index b6019554e591755ab71c243b3430012ebee25e4d..848c96ff02f816e40259cbefa5b2b3825e175e5f 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
-import collections
 import os
 import sys
 import unittest
@@ -8,8 +8,9 @@
 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
 
 
index 14e54ba2047bc3aa6a51975ab746eb61801b79d5..ce1624b68b7ab2e3016f3290b77515de7b299409 100644 (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
 
 
index 62bf5a306250d0f94cfc238ae008b64a9087677d..a70adfa302f1c8ffa43cfc0f85d4f03065e52cf6 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
index b82f174bb0f3c44210c90fbaad22a214c0544543..b98ddebcbedbb89d667d26f844ded008855604f6 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -8,10 +9,10 @@
 
 
 import hashlib
+import http.client
 import json
 import socket
 import urllib.error
-import http.client
 
 from test.helper import (
     assertGreaterEqual,
@@ -23,6 +24,7 @@
     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
index dac7707588350f25dbc620d98440569097a08b4a..cce7c59e2296061c2c00427cce5ff4275b1597b9 100644 (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
index 6efd432e971156f27eaa5bb7f9e1339531969207..1d15fddabc3df45f2eac0c83f23f36dd7b333d0c 100644 (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__)))
index 828797ec71e8ea14f97b82b4b2a4ccb226d458dd..b1aac77206548badce03bfa8c7e595312e206295 100644 (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__))
index 4b82b71874446701b50c31fae698c6acb0d403b7..47c632a4e2e51f578b204c1a5bc5c24abafd31d7 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,8 +7,8 @@
 
 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
 
 
index 872c58c8fab29e0d402aa692860bc2ecc0575685..4277cabe022ad8d6a49212a4ed7d52631b658e60 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,6 +7,7 @@
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
 from yt_dlp.jsinterp import JSInterpreter
 
 
index f7a0b33d269c1ecd7bd4b8af5f9d24769b96f063..dc708d974cf3e743aa45280bb7d5ba944b5b466d 100644 (file)
@@ -1,3 +1,6 @@
+#!/usr/bin/env python3
+
+# Allow direct execution
 import os
 import sys
 import unittest
index a6d5bae40d4e48f80cc554ff999ce803967bd1e0..6954c07f90f9506e1992e17374c51b1d497f3a98 100644 (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__)))
index e84a08f2958ad90cfe0fd4242686229c1206a935..3778d1794258679e55a386913be919db343ec3c8 100644 (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
 
 
index 9d8a4dcc505a888aea165d158b9fb26519c4112e..c49e3ede0f9322a371c191aeea469383b48978c1 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,6 +7,7 @@
 
 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 (
index 0b8e03a9f7e3ebdf1bf58a93550752b9323c706d..159faf58edaabb0f7f8997adf34f4b9815f6cb6c 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,6 +7,7 @@
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
 import random
 import subprocess
 import urllib.request
index 5120f83e2dc04778127124584bf7038c3883cbd9..57362895f10a9670b39e8d97bfd066a420d48a0b 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
index 73b55cdace83e686ce6cfdb3a60b187ef064ef95..85ac86692303c0190a32a0087ff4ebc01128a0be 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
index 38647adb44a0895de78895cdd8cbe5fe91d5df0f..8024a8e7c8da7977af90fdf578751adc60b66e79 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
-import contextlib
 import os
 import sys
 import unittest
@@ -8,7 +8,7 @@
 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
index 6579940740a23201cfe3bf522c66a5ca58ad4484..21ce10a1fbf345de3b13e327115d2681507a3bfa 100644 (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__)))
 
 
index cca60561f510842593698f4b248e0d1361c2fc43..c7cf199f6c89f5163dd051775db18a4e952fc957 100644 (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):
index 66611e236e4dcb04346e26cae44f5c78827d2e75..c2dd0ac3085ad9fb82539c0e7685ddb409c920d9 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,8 +7,8 @@
 
 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
 
 
index 36f8be6890267464789382ad79c50113704ff0e1..81be5d3c9e1dd0a1f6aee6e14db0828a28b2b4c6 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
index 2c2013295ced1a91091f2d4a15e7379cf65c807e..56304772b403afc51c5915e6aa136a42fdaddfaa 100644 (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
index df4eef4e2b07197c740964943c8fc830dbfa1fcd..94aaaeb6043734ef8dfe1c9f1346eb1a19ca2399 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 import collections
 import contextlib
 import datetime
index a5921c56567178429b7b589df6376a8ffc0af454..357be861b4db5b64cce8f13f89e5cc745879ae10 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 f'You are using an unsupported version of Python. Only Python versions 3.6 and above are supported by yt-dlp'  # noqa: F541
 
 __license__ = 'Public Domain'
index c9d275b86334259bb549224d0f76e900a7357ceb..ff5d71d3c97d6fdeb0fc86d5a5d177b3c8cda652 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Execute with
 # $ python -m yt_dlp
 
index 3a91fad0e03b63477525d1f8cc927f887ded14cf..9f8e8c3e534a506f294da3186e60eec6c111224b 100644 (file)
@@ -7,7 +7,6 @@
 from ._deprecated import *  # noqa: F401, F403
 from .compat_utils import passthrough_module
 
-
 # XXX: Implement this the same way as other DeprecationWarnings without circular import
 try:
     passthrough_module(__name__, '._legacy', callback=lambda attr: warnings.warn(
index 2b33638b66b3250822b45318fbdad67f54b17ea6..49bb13a3c96cd84971c608dee547d92e6e2b2084 100644 (file)
@@ -22,7 +22,7 @@
 import xml.etree.ElementTree as etree
 from subprocess import DEVNULL
 
-from .compat_utils import passthrough_module
+from .compat_utils import passthrough_module  # isort: split
 from .asyncio import run as compat_asyncio_run  # noqa: F401
 from .re import Pattern as compat_Pattern  # noqa: F401
 from .re import match as compat_Match  # noqa: F401
@@ -30,7 +30,6 @@
 from ..dependencies import brotli as compat_brotli  # noqa: F401
 from ..dependencies import websockets as compat_websockets  # noqa: F401
 
-
 passthrough_module(__name__, '...utils', ('WINDOWS_VT_MODE', 'windows_enable_vt_mode'))
 
 
index 79e253056b584380905b002749cfc8a78f7acbe5..82e17628105f26cd251cd2c98751540969258b6b 100644 (file)
@@ -4,7 +4,6 @@
 import sys
 import types
 
-
 _NO_ATTRIBUTE = object()
 
 _Package = collections.namedtuple('Package', ('name', 'version'))
index 6811a728818cc0cf1aec38ad4ce83c8baef3d10d..e2ff8c39f89c638c269622034ea01ac6960ff908 100644 (file)
@@ -1,5 +1,6 @@
 import contextlib
 import ctypes
+import http.cookiejar
 import json
 import os
 import shutil
@@ -11,7 +12,6 @@
 from datetime import datetime, timedelta, timezone
 from enum import Enum, auto
 from hashlib import pbkdf2_hmac
-import http.cookiejar
 
 from .aes import (
     aes_cbc_decrypt_bytes,
index ca5b264985357d0bd84075c2cb8b8c409813035c..6b59320b8af9629943a53997d9baaebebd0b5459 100644 (file)
@@ -1,10 +1,10 @@
+import http.client
 import os
 import random
 import socket
 import ssl
 import time
 import urllib.error
-import http.client
 
 from .common import FileDownloader
 from ..utils import (
index 1c3d4af2c05ce005d97db98e62448b20b80b791d..4c37044f67f1eda4df2cbe289824c4819c754e01 100644 (file)
@@ -2,6 +2,9 @@
 import collections
 import getpass
 import hashlib
+import http.client
+import http.cookiejar
+import http.cookies
 import itertools
 import json
 import math
@@ -12,9 +15,6 @@
 import time
 import urllib.request
 import xml.etree.ElementTree
-import http.client
-import http.cookiejar
-import http.cookies
 
 from ..compat import functools, re  # isort: split
 from ..compat import (
index 32ebd2ba618abbd26e277d6940175e35f844a5da..f77c5d44d2e204d41de5708c26b9645ebe1a649d 100644 (file)
@@ -7,10 +7,10 @@
     int_or_none,
     mimetype2ext,
     remove_end,
+    strip_or_none,
+    unified_strdate,
     url_or_none,
     urljoin,
-    unified_strdate,
-    strip_or_none,
 )
 
 
index 9478f3aa308a9e552c963b4cf90baa99c6eddb4c..7057b8b26e0737841855ce001dd01d54f97594b0 100644 (file)
@@ -1,8 +1,8 @@
 import itertools
 import json
 import time
-import urllib.parse
 import urllib.error
+import urllib.parse
 
 from .common import InfoExtractor
 from ..utils import ExtractorError, parse_iso8601, try_get
index 31c0080ba432bb04963af69beb084a112a3bebf7..9a237b3204e5c138a8c551edbac3f744891bdb96 100644 (file)
@@ -1,5 +1,3 @@
-
-
 import urllib.parse
 
 from .common import InfoExtractor
index be508f4349b1605147e24b028b39fda12b63163e..3f687f737bdf700a3bd3e928879aad309be11797 100644 (file)
@@ -1,5 +1,3 @@
-
-
 import urllib.parse
 
 from .common import InfoExtractor
index 6b02eb450e7601bc18f003acaccfb9137e5fa651..7327f315002df1a9a204c25b5a255696be4170bf 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
 import atexit
 import base64
 import binascii
@@ -16,6 +15,8 @@
 import hmac
 import html.entities
 import html.parser
+import http.client
+import http.cookiejar
 import importlib.util
 import io
 import itertools
@@ -42,8 +43,6 @@
 import urllib.request
 import xml.etree.ElementTree
 import zlib
-import http.client
-import http.cookiejar
 
 from .compat import asyncio, functools  # isort: split
 from .compat import (