mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed flake8 warning.
This commit is contained in:
@@ -104,7 +104,7 @@ def call_command(name, *args, **options):
|
|||||||
if command.use_argparse:
|
if command.use_argparse:
|
||||||
# Use the `dest` option name from the parser option
|
# Use the `dest` option name from the parser option
|
||||||
opt_mapping = dict((sorted(s_opt.option_strings)[0].lstrip('-').replace('-', '_'), s_opt.dest)
|
opt_mapping = dict((sorted(s_opt.option_strings)[0].lstrip('-').replace('-', '_'), s_opt.dest)
|
||||||
for s_opt in parser._actions if s_opt.option_strings)
|
for s_opt in parser._actions if s_opt.option_strings)
|
||||||
arg_options = dict((opt_mapping.get(key, key), value) for key, value in options.items())
|
arg_options = dict((opt_mapping.get(key, key), value) for key, value in options.items())
|
||||||
defaults = parser.parse_args(args=args)
|
defaults = parser.parse_args(args=args)
|
||||||
defaults = dict(defaults._get_kwargs(), **arg_options)
|
defaults = dict(defaults._get_kwargs(), **arg_options)
|
||||||
|
|||||||
Reference in New Issue
Block a user