Skip to content

Commit e066ca0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0f68056 commit e066ca0

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

repo2docker/engine.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ def _registry_credentials_validate(self, proposal):
183183
"""
184184
new = proposal["value"]
185185
if len({"registry", "username", "password"} & new.keys()) != 3:
186-
raise TraitError("registry_credentials must have keys 'registry', 'username' and 'password'")
186+
raise TraitError(
187+
"registry_credentials must have keys 'registry', 'username' and 'password'"
188+
)
187189

188190
string_output = True
189191
"""

tests/norun/test_registry.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ def test_registry_explicit_creds(registry, dind):
184184
env = os.environ.copy()
185185
env["DOCKER_CONFIG"] = d
186186
proc = subprocess.run(
187-
["docker", "manifest", "inspect", "--insecure", image_name],
188-
env=env
187+
["docker", "manifest", "inspect", "--insecure", image_name], env=env
189188
)
190189
assert proc.returncode == 0
191190

tests/unit/test_engine.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
import pytest
22
from traitlets import TraitError
3+
34
from repo2docker.engine import ContainerEngine
45

56

67
def test_registry_credentials():
78
e = ContainerEngine(parent=None)
89

910
# This should be fine
10-
e.registry_credentials = {"registry": "something", "username": "something", "password": "something"}
11+
e.registry_credentials = {
12+
"registry": "something",
13+
"username": "something",
14+
"password": "something",
15+
}
1116

1217
with pytest.raises(TraitError):
1318
e.registry_credentials = {"hi": "bye"}

0 commit comments

Comments
 (0)