osbuild: run isort on all files
This commit is contained in:
parent
98daf1a87d
commit
ea6085fae6
174 changed files with 106 additions and 257 deletions
|
|
@ -10,7 +10,6 @@ independent of osbuild but used across the osbuild codebase.
|
|||
|
||||
from .pipeline import Manifest, Pipeline, Stage
|
||||
|
||||
|
||||
__version__ = "67"
|
||||
|
||||
__all__ = [
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import sys
|
|||
|
||||
from osbuild.main_cli import osbuild_cli as main
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
r = main()
|
||||
sys.exit(r)
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ import json
|
|||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import traceback
|
||||
import threading
|
||||
import traceback
|
||||
from typing import Dict, Optional
|
||||
from .util.types import PathLike
|
||||
from .util import jsoncomm
|
||||
|
||||
from .util import jsoncomm
|
||||
from .util.types import PathLike
|
||||
|
||||
__all__ = [
|
||||
"API"
|
||||
|
|
|
|||
|
|
@ -15,13 +15,11 @@ import stat
|
|||
import subprocess
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
from typing import Optional, Set
|
||||
|
||||
from osbuild.api import BaseAPI
|
||||
from osbuild.util import linux
|
||||
|
||||
|
||||
__all__ = [
|
||||
"BuildRoot",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ import abc
|
|||
import hashlib
|
||||
import json
|
||||
import os
|
||||
|
||||
from typing import Dict, Optional, Any
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from osbuild import host
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@ the created tree into an artefact. The pipeline can have any
|
|||
number of nested build pipelines. A sources section is used
|
||||
to fetch resources.
|
||||
"""
|
||||
from typing import Dict, Any
|
||||
from osbuild.meta import Index, ValidationResult
|
||||
from ..pipeline import BuildResult, Manifest, Pipeline, detect_host_runner
|
||||
from typing import Any, Dict
|
||||
|
||||
from osbuild.meta import Index, ValidationResult
|
||||
|
||||
from ..pipeline import BuildResult, Manifest, Pipeline, detect_host_runner
|
||||
|
||||
VERSION = "1"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
Second, and current, version of the manifest description
|
||||
"""
|
||||
from typing import Dict, Any
|
||||
from typing import Any, Dict
|
||||
|
||||
from osbuild.meta import Index, ModuleInfo, ValidationResult
|
||||
|
||||
from ..inputs import Input
|
||||
from ..pipeline import Manifest, Pipeline, Stage, detect_host_runner
|
||||
from ..sources import Source
|
||||
|
||||
|
||||
VERSION = "2"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ import sys
|
|||
import threading
|
||||
import traceback
|
||||
from collections import OrderedDict
|
||||
from typing import Any, Dict, List, Optional, Tuple, Callable, Iterable, Union
|
||||
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
|
||||
|
||||
from osbuild.util.jsoncomm import FdSet, Socket
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ import abc
|
|||
import hashlib
|
||||
import json
|
||||
import os
|
||||
|
||||
from typing import Dict, Optional, Tuple, Any
|
||||
from typing import Any, Dict, Optional, Tuple
|
||||
|
||||
from osbuild import host
|
||||
from osbuild.util.types import PathLike
|
||||
|
||||
from .objectstore import StoreClient, StoreServer
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ import ast
|
|||
import contextlib
|
||||
import copy
|
||||
import importlib.util
|
||||
import json
|
||||
import os
|
||||
import pkgutil
|
||||
import json
|
||||
import sys
|
||||
from collections import deque
|
||||
from typing import Dict, Sequence, List, Optional, Union, Set, Deque, Any, Tuple
|
||||
from typing import (Any, Deque, Dict, List, Optional, Sequence, Set, Tuple,
|
||||
Union)
|
||||
|
||||
import jsonschema
|
||||
|
||||
|
||||
FAILED_TITLE = "JSON Schema validation failed"
|
||||
FAILED_TYPEURI = "https://osbuild.org/validation-error"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import json
|
|||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from typing import Dict
|
||||
|
||||
import osbuild
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import hashlib
|
|||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from typing import Dict, List
|
||||
|
||||
from osbuild import host
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ import os
|
|||
import subprocess
|
||||
import tempfile
|
||||
import uuid
|
||||
from typing import Optional, Iterator, Set
|
||||
from typing import Iterator, Optional, Set
|
||||
|
||||
from osbuild.util.types import PathLike
|
||||
from osbuild.util import jsoncomm, rmrf
|
||||
from osbuild.util.mnt import mount, umount
|
||||
from . import api
|
||||
from osbuild.util.types import PathLike
|
||||
|
||||
from . import api
|
||||
|
||||
__all__ = [
|
||||
"ObjectStore",
|
||||
|
|
|
|||
|
|
@ -5,18 +5,14 @@ import json
|
|||
import os
|
||||
from typing import Dict, Generator, Iterable, Iterator, List, Optional
|
||||
|
||||
from . import buildroot, host, objectstore, remoteloop
|
||||
from .api import API
|
||||
from . import buildroot
|
||||
from . import host
|
||||
from . import objectstore
|
||||
from . import remoteloop
|
||||
from .devices import Device, DeviceManager
|
||||
from .inputs import Input, InputManager
|
||||
from .mounts import Mount, MountManager
|
||||
from .objectstore import ObjectStore
|
||||
from .sources import Source
|
||||
from .util import osrelease
|
||||
from .objectstore import ObjectStore
|
||||
|
||||
|
||||
DEFAULT_CAPABILITIES = {
|
||||
"CAP_AUDIT_WRITE",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import contextlib
|
||||
import errno
|
||||
import os
|
||||
from . import api
|
||||
from . import loop
|
||||
|
||||
from . import api, loop
|
||||
from .util import jsoncomm
|
||||
|
||||
__all__ = [
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import abc
|
||||
import contextlib
|
||||
import os
|
||||
import json
|
||||
import tempfile
|
||||
import concurrent.futures
|
||||
import contextlib
|
||||
import json
|
||||
import os
|
||||
import tempfile
|
||||
from abc import abstractmethod
|
||||
from typing import Dict, Tuple
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import os
|
|||
|
||||
from .types import PathLike
|
||||
|
||||
|
||||
# How many bytes to read in one go. Taken from coreutils/gnulib
|
||||
BLOCKSIZE = 32768
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ library.
|
|||
|
||||
import contextlib
|
||||
|
||||
|
||||
__all__ = [
|
||||
"suppress_oserror",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import errno
|
|||
import json
|
||||
import os
|
||||
import socket
|
||||
from typing import Any
|
||||
from typing import Optional
|
||||
from typing import Any, Optional
|
||||
|
||||
from .types import PathLike
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import os
|
|||
import platform
|
||||
import threading
|
||||
|
||||
|
||||
__all__ = [
|
||||
"ioctl_get_immutable",
|
||||
"ioctl_toggle_immutable",
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ import re
|
|||
import shlex
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from typing import Dict, Any
|
||||
from typing import Any, Dict
|
||||
|
||||
import mako.template
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,8 @@ import os
|
|||
import re
|
||||
import struct
|
||||
import sys
|
||||
|
||||
from collections import OrderedDict
|
||||
from typing import BinaryIO, Dict, Union, List
|
||||
from typing import BinaryIO, Dict, List, Union
|
||||
|
||||
PathLike = Union[str, bytes, os.PathLike]
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ related documentation can be found in `os-release(5)`.
|
|||
|
||||
import os
|
||||
|
||||
|
||||
# The default paths where os-release is located, as per os-release(5)
|
||||
DEFAULT_PATHS = [
|
||||
"/etc/os-release",
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ import subprocess
|
|||
import sys
|
||||
import tempfile
|
||||
import typing
|
||||
|
||||
from typing import List, Any
|
||||
from typing import Any, List
|
||||
|
||||
from .types import PathLike
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import shutil
|
|||
|
||||
import osbuild.util.linux as linux
|
||||
|
||||
|
||||
__all__ = [
|
||||
"rmtree",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import errno
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from typing import Dict, TextIO
|
||||
|
||||
# Extended attribute name for SELinux labels
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
"""Wrapper module for output formatting."""
|
||||
|
||||
import sys
|
||||
|
||||
from typing import Dict
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import contextlib
|
||||
import pathlib
|
||||
|
||||
|
||||
# The default lock dir to use
|
||||
LOCKDIR = "/run/osbuild/locks/udev"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue