ruff/format

This commit is contained in:
Marc Beninca 2024-06-12 14:46:34 +02:00
parent 7d0ffb8a65
commit 0a035f2cd6
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
5 changed files with 35 additions and 15 deletions

View file

@ -1,2 +1,3 @@
"""Read Write eXecute."""
__version__ = "0.0.1"

View file

@ -6,10 +6,14 @@ rwx.cmd.need("mksquashfs")
def mksquashfs(input_root: str, output_file: str):
ps.run([
ps.run(
[
"mksquashfs",
input_root,
output_file,
"-comp", "zstd",
"-Xcompression-level", str(18),
])
"-comp",
"zstd",
"-Xcompression-level",
str(18),
]
)

View file

@ -17,8 +17,13 @@ MODULES = {
}
def make_image(image_format: str, image_path: str, modules: list[str],
memdisk_path: str, pubkey_path: str | None = None) -> None:
def make_image(
image_format: str,
image_path: str,
modules: list[str],
memdisk_path: str,
pubkey_path: str | None = None,
) -> None:
args = [
("grub-mkimage",),
("--compress", COMPRESSION),

View file

@ -16,6 +16,8 @@ def get_file_logger(name: str) -> logging.Logger:
logger.setLevel(logging.INFO)
#
return logger
def get_stream_logger() -> logging.Logger:
out_handler = logging.StreamHandler(stream=sys.stdout)
out_handler.setLevel(logging.INFO)
@ -25,4 +27,6 @@ def get_stream_logger() -> logging.Logger:
logger.setLevel(logging.INFO)
#
return logger
stream = get_stream_logger()

View file

@ -15,12 +15,18 @@ class SphinxProject(Project):
wipe(output_root)
arguments: list[str] = [
"-E",
"-j", "2",
"-b", "html",
"-D", f"project={self.name}",
"-D", "master_doc={}".format("index"),
"-D", "html_theme={}".format("sphinx_rtd_theme"),
"-c", self.root,
"-j",
"2",
"-b",
"html",
"-D",
f"project={self.name}",
"-D",
"master_doc={}".format("index"),
"-D",
"html_theme={}".format("sphinx_rtd_theme"),
"-c",
self.root,
# "-C",
path.join(self.root, self.name),
path.join(output_root, self.name),