Skip to content

Commit 154c7c2

Browse files
style: linting
1 parent fa79bf4 commit 154c7c2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

juju/secrets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def create_secret_data(args):
2727
"""
2828
data = {}
2929
for val in args:
30-
key, _, value = val.partition('=')
30+
key, _, value = val.partition("=")
3131
if not key or not value:
3232
raise ValueError(f"Invalid key value {val}")
3333

tests/unit/test_secrets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212

1313

1414
class TestCreateSecretData:
15-
@pytest.mark.parametrize("keyval", ["foo", "=bar", "baz=", "f=bar", "fo=bar", "foo_bar=baz"])
15+
@pytest.mark.parametrize(
16+
"keyval", ["foo", "=bar", "baz=", "f=bar", "ff=bar", "foo_bar=baz"]
17+
)
1618
def test_bad_key(self, keyval: str):
1719
with pytest.raises(ValueError):
1820
create_secret_data([keyval])
1921

20-
2122
@pytest.mark.parametrize(
2223
"keyval,expected_key,expected_val",
2324
[
@@ -27,14 +28,13 @@ def test_bad_key(self, keyval: str):
2728
("equalsign==", "equalsign", "PQ=="),
2829
("equalsign#base64=PQ==", "equalsign", "PQ=="),
2930
("pq-identity-theorem=P===Q", "pq-identity-theorem", "UD09PVE="),
30-
]
31+
],
3132
)
3233
def test_goo_key_values(self, keyval: str, expected_key: str, expected_val: str):
3334
actual = create_secret_data([keyval])
3435
expected = {expected_key: expected_val}
3536
assert actual == expected
3637

37-
3838
def test_key_content_too_large(self):
3939
with pytest.raises(ValueError):
4040
create_secret_data(["foo=" + ("a" * 8 * 1024)])

0 commit comments

Comments
 (0)