Skip to content

Commit 774d0bd

Browse files
committed
removed more unused imports
1 parent 1b7e020 commit 774d0bd

File tree

9 files changed

+3
-21
lines changed

9 files changed

+3
-21
lines changed

src/gardenlinux/oci/__main__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
gl-oci main entrypoint
55
"""
66

7-
import os
8-
97
import click
10-
from pygments.lexer import default
118

129
from .container import Container
1310

src/gardenlinux/oci/container.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from base64 import b64encode
1010
from collections.abc import Sequence
1111
from configparser import UNNAMED_SECTION, ConfigParser
12-
from hashlib import sha256
1312
from os import PathLike, fdopen, getenv
1413
from pathlib import Path
1514
from tempfile import mkstemp
@@ -18,12 +17,11 @@
1817

1918
import jsonschema
2019
from oras.container import Container as OrasContainer
21-
from oras.defaults import unknown_config_media_type as UNKNOWN_CONFIG_MEDIA_TYPE
2220
from oras.provider import Registry
2321
from oras.utils import extract_targz, make_targz
2422
from requests import Response
2523

26-
from ..constants import GL_MEDIA_TYPE_LOOKUP, OCI_IMAGE_INDEX_MEDIA_TYPE
24+
from ..constants import OCI_IMAGE_INDEX_MEDIA_TYPE
2725
from ..features.cname import CName
2826
from ..logger import LoggerSetup
2927
from .image_manifest import ImageManifest
@@ -117,7 +115,7 @@ def __init__(
117115

118116
# Login to registry if credentials are provided
119117
if username and password:
120-
self._logger.debug(f"Logging in with username/password")
118+
self._logger.debug("Logging in with username/password")
121119

122120
try:
123121
self.login(username, password)

tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
import os
33
import shutil
4-
import subprocess
54
import sys
65
from datetime import datetime, timedelta
76
from tempfile import mkstemp
@@ -27,7 +26,7 @@
2726
TEST_PLATFORMS,
2827
TEST_VERSION,
2928
)
30-
from .helper import call_command, spawn_background_process
29+
from .helper import spawn_background_process
3130

3231

3332
def generate_test_certificates():

tests/features/test_cname_main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import pytest
66

77
import gardenlinux.features.cname_main as cname_main
8-
from gardenlinux.features import CName
98

109

1110
def test_main_happy(monkeypatch, capsys):

tests/flavors/test_init.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import importlib
2-
import types
32

43
from gardenlinux import flavors
54

tests/helper.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import os
21
import shlex
32
import subprocess
43

5-
from .constants import CERT_DIR, GL_ROOT_DIR, ZOT_CONFIG_FILE
6-
74

85
def spawn_background_process(cmd, stdout=None, stderr=None):
96
args = shlex.split(cmd)

tests/oci/test_container.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import io
2-
import json
3-
import logging
41
from base64 import b64encode
52

63
import pytest

tests/oci/test_index.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import io
21
import json
32

43
import pytest

tests/oci/test_layer.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import builtins
2-
from pathlib import Path
3-
41
import pytest
52

63
import gardenlinux.oci.layer as gl_layer

0 commit comments

Comments
 (0)