From 7c6e83d12401f013065c9b26ab2a89b52a4811da Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 31 Jul 2024 10:55:00 +0800 Subject: [PATCH] perf: reformat code --- apps/terminal/mixin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/terminal/mixin.py b/apps/terminal/mixin.py index ffa41d765..f2d65a44e 100644 --- a/apps/terminal/mixin.py +++ b/apps/terminal/mixin.py @@ -2,12 +2,15 @@ from terminal.utils.loki_client import get_loki_client __all__ = ['LokiMixin', ] + class LokiMixin: - def get_loki_client(self): + @staticmethod + def get_loki_client(): return get_loki_client() - def create_loki_query(self, components, search): + @staticmethod + def create_loki_query(components, search): stream_selector = '{component!=""}' if components: stream_selector = '{component=~"%s"}' % components