Skip to content

Commit 7d342ac

Browse files
committed
format with black
1 parent 742d688 commit 7d342ac

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

src/python_gardenlinux_lib/oras/registry.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ def construct_layer_signed_data_string(
124124
data_to_sign = f"version:{version} cname:{cname} architecture:{architecture} media_type:{media_type} digest:{checksum_sha256}"
125125
return data_to_sign
126126

127+
127128
def setup_registry(
128129
container_name: str,
129130
private_key: Optional[str] = None,
@@ -146,6 +147,7 @@ def setup_registry(
146147
public_key=public_key,
147148
)
148149

150+
149151
class GlociRegistry(Registry):
150152
def __init__(
151153
self,
@@ -553,7 +555,12 @@ def upload_index(self, index: dict) -> requests.Response:
553555
return response
554556

555557
def push_image_manifest(
556-
self, architecture: str, cname: str, version: str, gardenlinux_root: str, build_artifacts_dir: str
558+
self,
559+
architecture: str,
560+
cname: str,
561+
version: str,
562+
gardenlinux_root: str,
563+
build_artifacts_dir: str,
557564
):
558565
"""
559566
creates and pushes an image manifest
@@ -563,8 +570,8 @@ def push_image_manifest(
563570
:param str build_artifacts_dir: directory where the build artifacts are located
564571
"""
565572

566-
# TODO: construct oci_artifacts default data
567-
573+
# TODO: construct oci_artifacts default data
574+
568575
oci_metadata = get_oci_metadata(cname, version, gardenlinux_root)
569576

570577
manifest_image = oras.oci.NewManifest()

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
GL_ROOT_DIR = "test-data/gardenlinux/"
1212

13+
1314
def write_zot_config(config_dict, file_path):
1415
with open(file_path, "w") as config_file:
1516
json.dump(config_dict, config_file, indent=4)

tests/test_push_image.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def test_push_example(version, cname, arch):
3333
private_key="cert/oci-sign.key",
3434
public_key="cert/oci-sign.crt",
3535
)
36-
registry.push_image_manifest(arch, cname, version, GARDENLINUX_ROOT_DIR_EXAMPLE, f"{GARDENLINUX_ROOT_DIR_EXAMPLE}/.build")
37-
38-
36+
registry.push_image_manifest(
37+
arch,
38+
cname,
39+
version,
40+
GARDENLINUX_ROOT_DIR_EXAMPLE,
41+
f"{GARDENLINUX_ROOT_DIR_EXAMPLE}/.build",
42+
)

0 commit comments

Comments
 (0)