Skip to content

Commit

Permalink
Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nemacysts committed Dec 27, 2023
1 parent a8a8114 commit 071f28b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sticht/rollbacks/slo.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_slos_for_service(service, soa_dir) -> Generator:

for sink in composite_sink.sinks():
if not alert_config_by_ts_metric[
sink.source.timeseries, sink.source.metric
sink.source.timeseries, sink.source.metric,
].is_silent:
signalflow, rules = sink.generate_signalflow_signals_and_rules()
query = textwrap.dedent('\n'.join(signalflow))
Expand Down
12 changes: 7 additions & 5 deletions sticht/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,13 @@ async def listen_for_slack_events(self):
log_error(f'Exception while processing event: {traceback.format_exc()}')
log.debug(f'event: {event!r}')
except Exception:
log_error('\n'.join(
'Uncaught error in listen_for_slack_events:',
traceback.format_exc(),
'Restarting event listener.',
))
log_error(
'\n'.join(
'Uncaught error in listen_for_slack_events:',
traceback.format_exc(),
'Restarting event listener.',
),
)
await self.listen_for_slack_events()

def notify_users(self, message):
Expand Down
2 changes: 1 addition & 1 deletion sticht/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def trigger(self, *args, **kwargs):
float
] = None # in normal operation, this will be None, but this lets tests set a max time.

def __init__(self,):
def __init__(self):

self.event_loop = asyncio.get_event_loop()
self.finished_event = asyncio.Event(loop=self.event_loop)
Expand Down
2 changes: 1 addition & 1 deletion tests/rollbacks/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


@mock.patch('sticht.rollbacks.sources.splunk.SplunkMetricWatcher.query')
def test_watch_metrics_for_service_creates_watchers(mock_splunk_metric_watcher_query, tmp_path,):
def test_watch_metrics_for_service_creates_watchers(mock_splunk_metric_watcher_query, tmp_path):
service = 'serviceA'
soa_dir = tmp_path
(soa_dir / service).mkdir()
Expand Down

0 comments on commit 071f28b

Please sign in to comment.