diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-12 01:39:26 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-12 05:32:50 +0530 |
commit | f9934b96145af8ac5dfdcbf684827aeaea9912a7 (patch) | |
tree | 0a00b551be555ed8aa70eac863cc83d335dc7b8a /yt_dlp/options.py | |
parent | cfb0511d822b39748c5a64dfe86b61ff8d5af176 (diff) | |
download | hypervideo-pre-f9934b96145af8ac5dfdcbf684827aeaea9912a7.tar.lz hypervideo-pre-f9934b96145af8ac5dfdcbf684827aeaea9912a7.tar.xz hypervideo-pre-f9934b96145af8ac5dfdcbf684827aeaea9912a7.zip |
[cleanup] Mark some compat variables for removal (#2173)
Authored by fstirlitz, pukkandan
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r-- | yt_dlp/options.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py index 67db6d067..8839b44d4 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -3,14 +3,13 @@ from __future__ import unicode_literals import os.path import optparse import re +import shlex import sys from .compat import ( compat_expanduser, compat_get_terminal_size, compat_getenv, - compat_kwargs, - compat_shlex_split, ) from .utils import ( Config, @@ -223,14 +222,12 @@ def create_parser(): fmt = optparse.IndentedHelpFormatter(width=max_width, max_help_position=max_help_position) fmt.format_option_strings = _format_option_string - kw = { - 'version': __version__, - 'formatter': fmt, - 'usage': '%prog [OPTIONS] URL [URL...]', - 'conflict_handler': 'resolve', - } - - parser = _YoutubeDLOptionParser(**compat_kwargs(kw)) + parser = _YoutubeDLOptionParser( + version=__version__, + formatter=fmt, + usage='%prog [OPTIONS] URL [URL...]', + conflict_handler='resolve' + ) general = optparse.OptionGroup(parser, 'General Options') general.add_option( @@ -833,7 +830,7 @@ def create_parser(): callback_kwargs={ 'allowed_keys': r'ffmpeg_[io]\d*|%s' % '|'.join(map(re.escape, list_external_downloaders())), 'default_key': 'default', - 'process': compat_shlex_split + 'process': shlex.split }, help=( 'Give these arguments to the external downloader. ' 'Specify the downloader name and the arguments separated by a colon ":". ' @@ -1339,7 +1336,7 @@ def create_parser(): callback_kwargs={ 'allowed_keys': r'\w+(?:\+\w+)?', 'default_key': 'default-compat', - 'process': compat_shlex_split, + 'process': shlex.split, 'multiple_keys': False }, help=( 'Give these arguments to the postprocessors. ' |