osbuild: run isort on all files

This commit is contained in:
Simon de Vlieger 2022-08-17 11:28:27 +02:00
parent 98daf1a87d
commit ea6085fae6
174 changed files with 106 additions and 257 deletions

View file

@ -4,11 +4,10 @@
import argparse
import os
import tempfile
import time
import subprocess
import sys
import tempfile
import time
RESET = "\033[0m"
GREEN = "\033[32m"

View file

@ -7,7 +7,6 @@ import argparse
import os
import sys
# from /usr/include/sys/mount.h
# these are file-system independent
MS_RDONLY = 1

View file

@ -2,8 +2,8 @@
# Test for API infrastructure
#
import os
import multiprocessing as mp
import os
import tempfile
import unittest

View file

@ -2,10 +2,9 @@
# Test for the build root
#
import pathlib
import os
import pathlib
import sys
from tempfile import TemporaryDirectory
import pytest

View file

@ -14,8 +14,8 @@ import osbuild.meta
from osbuild.formats import v1 as fmt
from osbuild.monitor import NullMonitor
from osbuild.objectstore import ObjectStore
from .. import test
from .. import test
BASIC_PIPELINE = {
"sources": {

View file

@ -10,7 +10,6 @@ import unittest
import osbuild
import osbuild.meta
BASIC_PIPELINE = {
"version": "2",
"sources": {

View file

@ -5,8 +5,8 @@
import contextlib
import fcntl
import os
import time
import threading
import time
from tempfile import TemporaryDirectory, TemporaryFile
import pytest

View file

@ -14,6 +14,7 @@ import osbuild.meta
from osbuild.monitor import LogMonitor
from osbuild.objectstore import ObjectStore
from osbuild.pipeline import detect_host_runner
from .. import test

View file

@ -7,9 +7,10 @@ import os
import shutil
import tempfile
import unittest
from pathlib import Path
from osbuild import objectstore
from .. import test

View file

@ -14,6 +14,7 @@ import osbuild.meta
from osbuild.monitor import NullMonitor
from osbuild.objectstore import ObjectStore
from osbuild.pipeline import Manifest, detect_host_runner
from .. import test

View file

@ -2,11 +2,11 @@
# Test for the util.checksum module
#
from tempfile import NamedTemporaryFile
import pytest
from osbuild.util import checksum
# pylint: disable=line-too-long
TEST_STRING = "I have of late, but wherefore I know not, lost all my bytes\n"
TEST_RESULT = {

View file

@ -3,14 +3,13 @@
#
import os
import tempfile
import subprocess
import tempfile
import osbuild.util.lorax as lorax
from .. import test
BASIC_TEMPLATE = """
# This is a comment
<%page args="tree, name"/>

View file

@ -2,14 +2,13 @@
# Test for the util.lvm2 module
#
import os
import json
import os
import subprocess
import time
import uuid
from typing import List
from tempfile import TemporaryDirectory
from typing import List
import pytest

View file

@ -8,6 +8,7 @@ import os
import subprocess
import tempfile
import unittest
import pytest
from osbuild.util import ostree

View file

@ -11,6 +11,7 @@ import tempfile
import unittest
from osbuild import loop
from .. import test
MEBIBYTE = 1024 * 1024

View file

@ -4,6 +4,7 @@
import json
import tempfile
import pytest
from .. import test

View file

@ -14,10 +14,11 @@ import threading
import pytest
import osbuild.objectstore
import osbuild.meta
import osbuild.objectstore
import osbuild.sources
from osbuild import host
from .. import test

View file

@ -17,8 +17,8 @@ from collections.abc import Mapping
from typing import Dict
from osbuild.util import selinux
from .. import initrd
from .. import test
from .. import initrd, test
def have_sfdisk_with_json():

View file

@ -203,6 +203,7 @@ class TestBase(unittest.TestCase):
return r.returncode == 0 and "mypy" in r.stdout
@staticmethod
def have_isort() -> bool:
"""Check isort Availability