Skip to content

Commit

Permalink
chore: fix linter
Browse files Browse the repository at this point in the history
MatteoVoges committed Jan 26, 2024
1 parent 9002f1d commit 0124d63
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test-build-publish.yml
Original file line number Diff line number Diff line change
@@ -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:
6 changes: 3 additions & 3 deletions kapitan/inputs/helm.py
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions tests/test_compile.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0124d63

Please sign in to comment.