format code
This commit is contained in:
parent
1560093127
commit
a8bdc80612
2 changed files with 7 additions and 11 deletions
|
@ -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]
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue