mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
This commit is contained in:
@@ -58,7 +58,7 @@ class CommandParser(ArgumentParser):
|
||||
def parse_args(self, args=None, namespace=None):
|
||||
# Catch missing argument for a better error message
|
||||
if (hasattr(self.cmd, 'missing_args_message') and
|
||||
not (args or any([not arg.startswith('-') for arg in args]))):
|
||||
not (args or any(not arg.startswith('-') for arg in args))):
|
||||
self.error(self.cmd.missing_args_message)
|
||||
return super(CommandParser, self).parse_args(args, namespace)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user