mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-03 23:43:21 -04:00
[cleanup] Consistent style for file heads
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
import collections
|
||||
import contextlib
|
||||
import datetime
|
||||
|
@@ -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'
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Execute with
|
||||
# $ python -m yt_dlp
|
||||
|
||||
|
@@ -7,7 +7,6 @@ from . import re
|
||||
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(
|
||||
|
@@ -22,7 +22,7 @@ import urllib.request
|
||||
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 Cryptodome_AES as compat_pycrypto_AES # noqa: F401
|
||||
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'))
|
||||
|
||||
|
||||
|
@@ -4,7 +4,6 @@ import importlib
|
||||
import sys
|
||||
import types
|
||||
|
||||
|
||||
_NO_ATTRIBUTE = object()
|
||||
|
||||
_Package = collections.namedtuple('Package', ('name', 'version'))
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import contextlib
|
||||
import ctypes
|
||||
import http.cookiejar
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
@@ -11,7 +12,6 @@ import time
|
||||
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,
|
||||
|
@@ -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 (
|
||||
|
@@ -2,6 +2,9 @@ import base64
|
||||
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 sys
|
||||
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 (
|
||||
|
@@ -7,10 +7,10 @@ from ..utils import (
|
||||
int_or_none,
|
||||
mimetype2ext,
|
||||
remove_end,
|
||||
strip_or_none,
|
||||
unified_strdate,
|
||||
url_or_none,
|
||||
urljoin,
|
||||
unified_strdate,
|
||||
strip_or_none,
|
||||
)
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import urllib.parse
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import urllib.parse
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
import atexit
|
||||
import base64
|
||||
import binascii
|
||||
@@ -16,6 +15,8 @@ import hashlib
|
||||
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.parse
|
||||
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 (
|
||||
|
Reference in New Issue
Block a user