mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-05 00:22:45 +00:00
Deprecate compiled_regex_type
This commit is contained in:
parent
223d141ad4
commit
6bb94a80c0
@ -321,6 +321,7 @@ banned-from = [
|
||||
"yt_dlp.compat.compat_os_name".msg = "Use `os.name` instead."
|
||||
"yt_dlp.compat.compat_realpath".msg = "Use `os.path.realpath` instead."
|
||||
"yt_dlp.utils.decodeOption".msg = "Do not use"
|
||||
"yt_dlp.utils.compiled_regex_type".msg = "Use `re.Pattern` instead."
|
||||
|
||||
[tool.autopep8]
|
||||
max_line_length = 120
|
||||
|
||||
@ -9,6 +9,7 @@ passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
|
||||
del passthrough_module
|
||||
|
||||
|
||||
import re
|
||||
import struct
|
||||
|
||||
|
||||
@ -25,3 +26,6 @@ def intlist_to_bytes(xs):
|
||||
if not xs:
|
||||
return b''
|
||||
return struct.pack('%dB' % len(xs), *xs)
|
||||
|
||||
|
||||
compiled_regex_type = type(re.compile(''))
|
||||
|
||||
@ -54,9 +54,6 @@ from ..dependencies import xattr
|
||||
|
||||
__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:
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user