ruff/format
This commit is contained in:
parent
7d0ffb8a65
commit
0a035f2cd6
5 changed files with 35 additions and 15 deletions
|
@ -1,2 +1,3 @@
|
|||
"""Read Write eXecute."""
|
||||
|
||||
__version__ = "0.0.1"
|
||||
|
|
|
@ -6,10 +6,14 @@ rwx.cmd.need("mksquashfs")
|
|||
|
||||
|
||||
def mksquashfs(input_root: str, output_file: str):
|
||||
ps.run([
|
||||
"mksquashfs",
|
||||
input_root,
|
||||
output_file,
|
||||
"-comp", "zstd",
|
||||
"-Xcompression-level", str(18),
|
||||
])
|
||||
ps.run(
|
||||
[
|
||||
"mksquashfs",
|
||||
input_root,
|
||||
output_file,
|
||||
"-comp",
|
||||
"zstd",
|
||||
"-Xcompression-level",
|
||||
str(18),
|
||||
]
|
||||
)
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue