From 0124d6320c4a10a224b61aab8be17879a89590d2 Mon Sep 17 00:00:00 2001 From: Matteo Voges Date: Fri, 26 Jan 2024 11:52:24 +0100 Subject: [PATCH] chore: fix linter --- .github/workflows/test-build-publish.yml | 2 -- kapitan/inputs/helm.py | 6 +++--- tests/test_compile.py | 5 +++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-build-publish.yml b/.github/workflows/test-build-publish.yml index b39b2d802..f924c9d56 100644 --- a/.github/workflows/test-build-publish.yml +++ b/.github/workflows/test-build-publish.yml @@ -40,8 +40,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 - with: - python-version: '3.10' - uses: psf/black@main test: diff --git a/kapitan/inputs/helm.py b/kapitan/inputs/helm.py index 10b4af815..9168513ad 100644 --- a/kapitan/inputs/helm.py +++ b/kapitan/inputs/helm.py @@ -257,9 +257,9 @@ class HelmChart(BaseModel): def new(self): for obj in self.load_chart(): - self.root[ - f"{obj['metadata']['name'].lower()}-{obj['kind'].lower().replace(':','-')}" - ] = BaseObj.from_dict(obj) + self.root[f"{obj['metadata']['name'].lower()}-{obj['kind'].lower().replace(':','-')}"] = ( + BaseObj.from_dict(obj) + ) def load_chart(self): helm_values_file = None diff --git a/tests/test_compile.py b/tests/test_compile.py index 5196ae99b..540024181 100644 --- a/tests/test_compile.py +++ b/tests/test_compile.py @@ -152,8 +152,9 @@ def test_compile_not_enough_args(self): self.assertEqual(cm.exception.code, 1) def test_compile_not_matching_targets(self): - with self.assertLogs(logger="kapitan.targets", level="ERROR") as cm, contextlib.redirect_stdout( - io.StringIO() + with ( + self.assertLogs(logger="kapitan.targets", level="ERROR") as cm, + contextlib.redirect_stdout(io.StringIO()), ): # as of now, we cannot capture stdout with contextlib.redirect_stdout # since we only do logger.error(e) in targets.py before exiting