From a8bdc8061208169576a72d97fbd8ece8390e8c07 Mon Sep 17 00:00:00 2001 From: HgO Date: Sun, 10 Jul 2022 14:09:00 +0200 Subject: [PATCH] format code --- matrix_alertbot/command.py | 10 +++------- tests/test_command.py | 8 ++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/matrix_alertbot/command.py b/matrix_alertbot/command.py index 45991ea..e75a34b 100644 --- a/matrix_alertbot/command.py +++ b/matrix_alertbot/command.py @@ -1,5 +1,5 @@ import logging -from typing import List, Optional +from typing import List from diskcache import Cache from nio import AsyncClient, MatrixRoom @@ -86,9 +86,7 @@ class Command: f"Receiving a command to create a silence for a duration of {duration}" ) - logger.debug( - f"Read alert fingerprints for event {self.event_id} from cache" - ) + logger.debug(f"Read alert fingerprints for event {self.event_id} from cache") count_created_silences = 0 alert_fingerprints = self.cache[self.event_id] @@ -127,9 +125,7 @@ class Command: matchers.append(matcher) logger.debug("Receiving a command to delete a silence") - logger.debug( - f"Read alert fingerprints for event {self.event_id} from cache" - ) + logger.debug(f"Read alert fingerprints for event {self.event_id} from cache") count_removed_silences = 0 alert_fingerprints = self.cache[self.event_id] diff --git a/tests/test_command.py b/tests/test_command.py index 837f9f3..be0771e 100644 --- a/tests/test_command.py +++ b/tests/test_command.py @@ -74,7 +74,7 @@ class CommandTestCase(unittest.IsolatedAsyncioTestCase): "ack", self.fake_room, self.fake_sender, - self.fake_event_id + self.fake_event_id, ) await command.process() @@ -95,7 +95,7 @@ class CommandTestCase(unittest.IsolatedAsyncioTestCase): command_word, self.fake_room, self.fake_sender, - self.fake_event_id + self.fake_event_id, ) await command.process() @@ -115,7 +115,7 @@ class CommandTestCase(unittest.IsolatedAsyncioTestCase): "help", self.fake_room, self.fake_sender, - self.fake_event_id + self.fake_event_id, ) await command.process() @@ -135,7 +135,7 @@ class CommandTestCase(unittest.IsolatedAsyncioTestCase): "", self.fake_room, self.fake_sender, - self.fake_event_id + self.fake_event_id, ) await command.process()