From 38d48aaec3b62ef8ca716932fa63ffdb485abd32 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 20 Sep 2025 20:47:52 +0100 Subject: [PATCH 1/2] Don't indent end-of-file marker --- toltec/hooks/install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toltec/hooks/install_lib.py b/toltec/hooks/install_lib.py index 1287014..109a067 100644 --- a/toltec/hooks/install_lib.py +++ b/toltec/hooks/install_lib.py @@ -152,7 +152,7 @@ def post_package( [Install] WantedBy=local-fs.target - UNIT +UNIT systemctl daemon-reload systemctl enable "$unit_name" From 963e70a7417e1572e3ce6cbf4c2cfaee1c4a9be7 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 20 Sep 2025 21:13:52 +0100 Subject: [PATCH 2/2] Run inspect.cleandoc on source code --- toltec/hooks/install_lib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toltec/hooks/install_lib.py b/toltec/hooks/install_lib.py index 109a067..77d91a3 100644 --- a/toltec/hooks/install_lib.py +++ b/toltec/hooks/install_lib.py @@ -5,6 +5,7 @@ methods and add them to scripts if found. """ +import inspect import logging from typing import Set, Iterable @@ -20,7 +21,7 @@ def add_method(name: str, src: str, *depends: Iterable[str]) -> None: """Add a method to be automatically added to scripts that use it""" METHODS[name] = ( - src, + inspect.cleandoc(src), depends, ) @@ -152,7 +153,7 @@ def post_package( [Install] WantedBy=local-fs.target -UNIT + UNIT systemctl daemon-reload systemctl enable "$unit_name"