Skip to content

Commit

Permalink
janitor: Run ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
hunger committed Sep 15, 2024
1 parent 0650c96 commit c2a9172
Show file tree
Hide file tree
Showing 156 changed files with 146 additions and 292 deletions.
1 change: 0 additions & 1 deletion cleanroom/binarymanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from .exceptions import PreflightError
from .printer import debug, warn

Expand Down
1 change: 0 additions & 1 deletion cleanroom/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@author: Tobias Hunger <[email protected]>
"""


from __future__ import annotations

from .binarymanager import Binaries
Expand Down
3 changes: 1 addition & 2 deletions cleanroom/commandmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from .command import Command, stringify
from .exceptions import PreflightError
from .location import Location
Expand Down Expand Up @@ -175,7 +174,7 @@ def __validate_func(
) -> None:
cmd_str = stringify(cmd.name, args, kwargs)
trace(f"{location} Validating {cmd_str}.")
command.validate(location, *args, **kwargs),
(command.validate(location, *args, **kwargs),)
success(f"{location}: Validated {cmd_str}.", verbosity=4)

def __dependency_func(
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_catalog_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.helper.run import run
from cleanroom.location import Location
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_dynamic_trust_store_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.binarymanager import Binaries
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_fontconfig_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_glib_schemas_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.binarymanager import Binaries
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_graphviz_dot_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.binarymanager import Binaries
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_hwdb_update_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.helper.run import run
from cleanroom.location import Location
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_icon_cache_update_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.binarymanager import Binaries
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_ldconfig_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_locale_archive_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_mandb_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.binarymanager import Binaries
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_mime_update_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.binarymanager import Binaries
from cleanroom.helper.run import run
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_clr_sysusers_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.binarymanager import Binaries
from cleanroom.helper.run import run
Expand Down
2 changes: 1 addition & 1 deletion cleanroom/commands/_create_clrm_config_initrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def _install_debug_support(
system_context: SystemContext,
tmp: str,
):
_install_shadow_file(tmp, system_context),
(_install_shadow_file(tmp, system_context),)

for cmd in [
"/usr/bin/journalctl",
Expand Down
5 changes: 2 additions & 3 deletions cleanroom/commands/_create_dmverity_fsimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.location import Location
Expand All @@ -26,7 +25,7 @@ def __init__(self, **services: typing.Any) -> None:
syntax="DMVERITY_IMAGE FILE " "[base_image=<BASE_FILE_IMAGE]",
help_string="Export a filesystem image.",
file=__file__,
**services
**services,
)

def validate(
Expand All @@ -43,7 +42,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""
verity_file = args[0]
Expand Down
5 changes: 1 addition & 4 deletions cleanroom/commands/_create_efi_fsimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from tempfile import TemporaryDirectory
from cleanroom.exceptions import GenerateError
from cleanroom.binarymanager import Binaries
Expand Down Expand Up @@ -121,9 +120,7 @@ def _populate_with_efi_emulator(staging_area: str, efi_emulator: str):
</dict>
</dict>
</plist>
""".encode(
"utf-8"
)
""".encode("utf-8")
)


Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_create_efi_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.exceptions import GenerateError
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_create_export_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.location import Location
Expand Down
7 changes: 3 additions & 4 deletions cleanroom/commands/_create_root_fsimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.exceptions import GenerateError
Expand Down Expand Up @@ -34,7 +33,7 @@ def __init__(self, **services: typing.Any) -> None:
syntax="<ROOTFS_IMAGE> [usr_only=True]",
help_string="Create a root filesystem image",
file=__file__,
**services
**services,
)

def validate(
Expand All @@ -51,7 +50,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""
self._usr_only = kwargs.get("usr_only", True)
Expand All @@ -78,6 +77,6 @@ def __call__(
"-noX",
"-processors",
"1",
work_directory=system_context.fs_directory
work_directory=system_context.fs_directory,
)
size_extend(rootfs_file)
1 change: 0 additions & 1 deletion cleanroom/commands/_depmod_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.location import Location
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_export_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.helper.run import run
Expand Down
5 changes: 2 additions & 3 deletions cleanroom/commands/_pacman_keyinit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.location import Location
from cleanroom.systemcontext import SystemContext
Expand All @@ -24,7 +23,7 @@ def __init__(self, **services: typing.Any) -> None:
"gpg_dir=<path_to_gpg_dir>",
help_string="Enable extra setup for the pacman keyring.",
file=__file__,
**services
**services,
)

def validate(
Expand All @@ -40,7 +39,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""

Expand Down
5 changes: 2 additions & 3 deletions cleanroom/commands/_pacman_write_package_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.helper.archlinux.pacman import pacman_report
Expand All @@ -23,7 +22,7 @@ def __init__(self, **services: typing.Any) -> None:
"_pacman_write_package_data",
help_string="Write pacman package data into the filesystem.",
file=__file__,
**services
**services,
)

def validate(
Expand All @@ -37,7 +36,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""
pacman_report(
Expand Down
5 changes: 2 additions & 3 deletions cleanroom/commands/_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.location import Location
from cleanroom.systemcontext import SystemContext
Expand All @@ -23,7 +22,7 @@ def __init__(self, **services: typing.Any) -> None:
syntax="<STATIC> [pretty=<PRETTY>]",
help_string="Set the hostname of the system.",
file=__file__,
**services
**services,
)

def validate(
Expand All @@ -39,7 +38,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""

Expand Down
5 changes: 2 additions & 3 deletions cleanroom/commands/_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.binarymanager import Binaries
from cleanroom.command import Command
from cleanroom.helper.btrfs import BtrfsHelper
Expand Down Expand Up @@ -59,7 +58,7 @@ def __init__(self, **services: typing.Any) -> None:
help_string="Implicitly run before any "
"other command of a system is run.",
file=__file__,
**services
**services,
)

def validate(
Expand Down Expand Up @@ -126,7 +125,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""
_setup_scratch_directory(system_context, self._service("btrfs_helper"))
Expand Down
3 changes: 1 addition & 2 deletions cleanroom/commands/_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.location import Location
from cleanroom.command import Command
from cleanroom.systemcontext import SystemContext
Expand Down Expand Up @@ -35,7 +34,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""

Expand Down
4 changes: 2 additions & 2 deletions cleanroom/commands/_strip_documentation_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, **services: typing.Any) -> None:
"_strip_documentation_hook",
help_string="Strip away documentation files (hook).",
file=__file__,
**services
**services,
)

def validate(
Expand All @@ -36,7 +36,7 @@ def __call__(
location: Location,
system_context: SystemContext,
*args: typing.Any,
**kwargs: typing.Any
**kwargs: typing.Any,
) -> None:
"""Execute command."""
location.set_description("Strip documentation files")
Expand Down
1 change: 0 additions & 1 deletion cleanroom/commands/_teardown.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Tobias Hunger <[email protected]>
"""


from cleanroom.command import Command
from cleanroom.systemcontext import SystemContext
from cleanroom.location import Location
Expand Down
Loading

0 comments on commit c2a9172

Please sign in to comment.