mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 17:51:24 +01:00
Compare commits
No commits in common. "b525b658881aaf8cb885d521998b5991c81abbf1" and "223d141ad4f2cc9c5673ae737aff99bce5af2ba7" have entirely different histories.
b525b65888
...
223d141ad4
|
@ -304,13 +304,23 @@ banned-from = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||||
|
"yt_dlp.compat.compat_str".msg = "Use `str` instead."
|
||||||
|
"yt_dlp.compat.compat_b64decode".msg = "Use `base64.b64decode` instead."
|
||||||
|
"yt_dlp.compat.compat_urlparse".msg = "Use `urllib.parse` instead."
|
||||||
|
"yt_dlp.compat.compat_parse_qs".msg = "Use `urllib.parse.parse_qs` instead."
|
||||||
|
"yt_dlp.compat.compat_urllib_parse_unquote".msg = "Use `urllib.parse.unquote` instead."
|
||||||
|
"yt_dlp.compat.compat_urllib_parse_urlencode".msg = "Use `urllib.parse.urlencode` instead."
|
||||||
|
"yt_dlp.compat.compat_urllib_parse_urlparse".msg = "Use `urllib.parse.urlparse` instead."
|
||||||
|
"yt_dlp.compat.compat_shlex_quote".msg = "Use `yt_dlp.utils.shell_quote` instead."
|
||||||
|
"yt_dlp.utils.error_to_compat_str".msg = "Use `str` instead."
|
||||||
|
"yt_dlp.utils.bytes_to_intlist".msg = "Use `list` instead."
|
||||||
|
"yt_dlp.utils.intlist_to_bytes".msg = "Use `bytes` instead."
|
||||||
|
"yt_dlp.utils.decodeArgument".msg = "Do not use"
|
||||||
|
"yt_dlp.utils.decodeFilename".msg = "Do not use"
|
||||||
|
"yt_dlp.utils.encodeFilename".msg = "Do not use"
|
||||||
"yt_dlp.compat.compat_os_name".msg = "Use `os.name` instead."
|
"yt_dlp.compat.compat_os_name".msg = "Use `os.name` instead."
|
||||||
"yt_dlp.compat.compat_realpath".msg = "Use `os.path.realpath` instead."
|
"yt_dlp.compat.compat_realpath".msg = "Use `os.path.realpath` instead."
|
||||||
"yt_dlp.compat.compat_shlex_quote".msg = "Use `yt_dlp.utils.shell_quote` instead."
|
"yt_dlp.utils.decodeOption".msg = "Do not use"
|
||||||
"yt_dlp.compat.functools".msg = "Use `functools` instead."
|
|
||||||
"yt_dlp.utils.bytes_to_intlist".msg = "Use `list` instead."
|
|
||||||
"yt_dlp.utils.compiled_regex_type".msg = "Use `re.Pattern` instead."
|
|
||||||
"yt_dlp.utils.intlist_to_bytes".msg = "Use `bytes` instead."
|
|
||||||
|
|
||||||
[tool.autopep8]
|
[tool.autopep8]
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
|
|
|
@ -8,7 +8,6 @@ passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
|
||||||
DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=6))
|
DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=6))
|
||||||
del passthrough_module
|
del passthrough_module
|
||||||
|
|
||||||
import functools # noqa: F401
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|
7
yt_dlp/compat/functools.py
Normal file
7
yt_dlp/compat/functools.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# flake8: noqa: F405
|
||||||
|
from functools import * # noqa: F403
|
||||||
|
|
||||||
|
from .compat_utils import passthrough_module
|
||||||
|
|
||||||
|
passthrough_module(__name__, 'functools')
|
||||||
|
del passthrough_module
|
|
@ -9,7 +9,6 @@ passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
|
||||||
del passthrough_module
|
del passthrough_module
|
||||||
|
|
||||||
|
|
||||||
import re
|
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +25,3 @@ def intlist_to_bytes(xs):
|
||||||
if not xs:
|
if not xs:
|
||||||
return b''
|
return b''
|
||||||
return struct.pack('%dB' % len(xs), *xs)
|
return struct.pack('%dB' % len(xs), *xs)
|
||||||
|
|
||||||
|
|
||||||
compiled_regex_type = type(re.compile(''))
|
|
||||||
|
|
|
@ -54,6 +54,9 @@ from ..dependencies import xattr
|
||||||
|
|
||||||
__name__ = __name__.rsplit('.', 1)[0] # noqa: A001: Pretend to be the parent module
|
__name__ = __name__.rsplit('.', 1)[0] # noqa: A001: Pretend to be the parent module
|
||||||
|
|
||||||
|
# This is not clearly defined otherwise
|
||||||
|
compiled_regex_type = type(re.compile(''))
|
||||||
|
|
||||||
|
|
||||||
class NO_DEFAULT:
|
class NO_DEFAULT:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user