From f9b1260a6c4dec2c3b4291c7a206e04ec6b691bd Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Jan 2021 09:53:40 +0100 Subject: Use super() where applicable. --- alot/commands/thread.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'alot/commands/thread.py') diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 7523f46b..84b1c611 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -151,7 +151,7 @@ class ReplyCommand(Command): self.groupreply = all self.listreply = listreply self.force_spawn = spawn - Command.__init__(self, **kwargs) + super().__init__(**kwargs) async def apply(self, ui): # get message to reply to if not given in constructor @@ -325,7 +325,7 @@ class ForwardCommand(Command): self.message = message self.inline = not attach self.force_spawn = spawn - Command.__init__(self, **kwargs) + super().__init__(**kwargs) async def apply(self, ui): # get message to forward if not given in constructor @@ -406,7 +406,7 @@ class BounceMailCommand(Command): :type message: `alot.db.message.Message` """ self.message = message - Command.__init__(self, **kwargs) + super().__init__(**kwargs) async def apply(self, ui): # get mail to bounce @@ -473,7 +473,7 @@ class EditNewCommand(Command): """ self.message = message self.force_spawn = spawn - Command.__init__(self, **kwargs) + super().__init__(**kwargs) async def apply(self, ui): if not self.message: @@ -556,7 +556,7 @@ class ChangeDisplaymodeCommand(Command): self.fold = fold self.weight = weight self.cycle_alt = cycle_alt - Command.__init__(self, **kwargs) + super().__init__(**kwargs) def apply(self, ui): tbuffer = ui.current_buffer @@ -681,7 +681,7 @@ class PipeCommand(Command): :param done_msg: notification message to show upon success :type done_msg: str """ - Command.__init__(self, **kwargs) + super().__init__(**kwargs) if isinstance(cmd, str): cmd = split_commandstring(cmd) self.cmd = cmd @@ -825,13 +825,13 @@ class PrintCommand(PipeCommand): noop_msg = 'no print command specified. Set "print_cmd" in the '\ 'global section.' - PipeCommand.__init__(self, [cmd], all=all, separately=separately, - background=True, - shell=False, - format='raw' if raw else 'decoded', - add_tags=add_tags, - noop_msg=noop_msg, confirm_msg=confirm_msg, - done_msg=ok_msg, **kwargs) + super().__init__([cmd], all=all, separately=separately, + background=True, + shell=False, + format='raw' if raw else 'decoded', + add_tags=add_tags, + noop_msg=noop_msg, confirm_msg=confirm_msg, + done_msg=ok_msg, **kwargs) @registerCommand(MODE, 'save', arguments=[ @@ -848,7 +848,7 @@ class SaveAttachmentCommand(Command): directory. :type path: str """ - Command.__init__(self, **kwargs) + super().__init__(**kwargs) self.all = all self.path = path @@ -903,7 +903,7 @@ class OpenAttachmentCommand(Command): :param attachment: attachment to open :type attachment: :class:`~alot.db.attachment.Attachment` """ - Command.__init__(self, **kwargs) + super().__init__(**kwargs) self.attachment = attachment async def apply(self, ui): @@ -1085,7 +1085,7 @@ class TagCommand(Command): self.tagsstring = tags self.all = all self.action = action - Command.__init__(self, **kwargs) + super().__init__(**kwargs) async def apply(self, ui): if self.all: -- cgit v1.2.3