From 3fb37a1d0237869e8e37864d06c0dfd94bb43189 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Sep 2021 06:12:56 +0200 Subject: Merging upstream version 2.2.0. Signed-off-by: Daniel Baumann --- tasks.py | 54 +++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index aaed0f3..3a7e1e3 100644 --- a/tasks.py +++ b/tasks.py @@ -13,7 +13,7 @@ class BaseCommand(Command, object): user_options = [] - default_cmd_options = ('verbose', 'quiet', 'dry_run') + default_cmd_options = ("verbose", "quiet", "dry_run") def __init__(self, *args, **kwargs): super(BaseCommand, self).__init__(*args, **kwargs) @@ -40,54 +40,58 @@ class BaseCommand(Command, object): def apply_options(self, cmd, options=()): """Apply command-line options.""" - for option in (self.default_cmd_options + options): - cmd = self.apply_option(cmd, option, - active=getattr(self, option, False)) + for option in self.default_cmd_options + options: + cmd = self.apply_option(cmd, option, active=getattr(self, option, False)) return cmd def apply_option(self, cmd, option, active=True): """Apply a command-line option.""" - return re.sub(r'{{{}\:(?P