From 6cfa51aa1deaa754c9a2b5ba7acefab3bba6c499 Mon Sep 17 00:00:00 2001 From: peroxile <143724653+peroxile@users.noreply.github.com> Date: Mon, 27 Apr 2026 12:19:26 +0200 Subject: [PATCH] fix: trailing newlines, f-string, import order --- adapters/linux/disk.py | 2 +- adapters/linux/network.py | 2 +- adapters/linux/services.py | 2 +- adapters/notify/filelog.py | 2 +- adapters/notify/stdout.py | 2 +- adapters/repo/fetch.py | 2 +- adapters/repo/sync.py | 2 +- core/detect.py | 2 +- core/engine.py | 2 +- core/plan.py | 2 +- core/schemas.py | 2 +- core/verify.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/adapters/linux/disk.py b/adapters/linux/disk.py index 9445334..863b194 100644 --- a/adapters/linux/disk.py +++ b/adapters/linux/disk.py @@ -82,4 +82,4 @@ def clean_tmp(paths: list[str] | None = None, older_than_days: int = 7, dry_run: "ok": len(errors) == 0, "message": f"{'[dry-run] Would remove' if dry_run else 'Removed'} {len(removed)} items", "context": {"removed": removed, "errors": errors, "dry_run": dry_run}, - } \ No newline at end of file + } diff --git a/adapters/linux/network.py b/adapters/linux/network.py index 96e5026..c7d5953 100644 --- a/adapters/linux/network.py +++ b/adapters/linux/network.py @@ -119,4 +119,4 @@ def restart_interface(interface: str = "auto") -> dict: "ok": False, "message": f"Failed to restart {resolved}: {e}", "context": {"interface": resolved}, - } \ No newline at end of file + } diff --git a/adapters/linux/services.py b/adapters/linux/services.py index e8d675f..ae214c7 100644 --- a/adapters/linux/services.py +++ b/adapters/linux/services.py @@ -72,4 +72,4 @@ def restart(name: str) -> dict: "ok": False, "message": f"Timeout restarting service {name}", "context": {"service": name}, - } \ No newline at end of file + } diff --git a/adapters/notify/filelog.py b/adapters/notify/filelog.py index 00bf8d1..6cfa95b 100644 --- a/adapters/notify/filelog.py +++ b/adapters/notify/filelog.py @@ -48,4 +48,4 @@ def emit(record: StateRecord, log_path: str | Path = DEFAULT_LOG_PATH) -> None: def emit_all(records: list[StateRecord], log_path: str | Path = DEFAULT_LOG_PATH) -> None: for record in records: - emit(record, log_path) \ No newline at end of file + emit(record, log_path) diff --git a/adapters/notify/stdout.py b/adapters/notify/stdout.py index 494c127..31ee9ba 100644 --- a/adapters/notify/stdout.py +++ b/adapters/notify/stdout.py @@ -60,4 +60,4 @@ def emit_all(records: list[StateRecord]) -> None: print("[swiftbox] all checks passed — no actions taken", flush=True) return for record in records: - emit(record) \ No newline at end of file + emit(record) diff --git a/adapters/repo/fetch.py b/adapters/repo/fetch.py index 3defdf0..8cc84e0 100644 --- a/adapters/repo/fetch.py +++ b/adapters/repo/fetch.py @@ -138,4 +138,4 @@ def fetch_config( def checksum_of(path: str | Path) -> str: """Return sha256 of a local file. Useful for pre-populating expected checksums.""" - return _sha256(Path(path).read_bytes()) \ No newline at end of file + return _sha256(Path(path).read_bytes()) diff --git a/adapters/repo/sync.py b/adapters/repo/sync.py index 2c5ed54..be3ad47 100644 --- a/adapters/repo/sync.py +++ b/adapters/repo/sync.py @@ -147,4 +147,4 @@ def entries_from_manifest(manifest: dict) -> list[SyncEntry]: expected_checksum=item.get("checksum"), required=item.get("required", True), )) - return result \ No newline at end of file + return result diff --git a/core/detect.py b/core/detect.py index 8568015..4bfd6dd 100644 --- a/core/detect.py +++ b/core/detect.py @@ -152,4 +152,4 @@ def run_all_checks( def run_checks_from_config(config_path: str | Path, host: str) -> list[IssueReport]: """Convenience: load config and run all checks in one call.""" checks = load_healthcheck_config(config_path) - return run_all_checks(checks, host) \ No newline at end of file + return run_all_checks(checks, host) diff --git a/core/engine.py b/core/engine.py index 785fd6b..611d65e 100644 --- a/core/engine.py +++ b/core/engine.py @@ -417,4 +417,4 @@ def run_workflow( ) _write_state(record, state_dir) _notify([record], notify_targets, host_config.log_path) - return record \ No newline at end of file + return record diff --git a/core/plan.py b/core/plan.py index 5540f9b..ec38730 100644 --- a/core/plan.py +++ b/core/plan.py @@ -208,4 +208,4 @@ def plan( workflow_id, host_config.name, effective_dry_run, approved, ) - return requests \ No newline at end of file + return requests diff --git a/core/schemas.py b/core/schemas.py index d84a76c..810a052 100644 --- a/core/schemas.py +++ b/core/schemas.py @@ -168,4 +168,4 @@ class StateRecord: issue: Optional[IssueReport] action: Optional[ActionResult] verification: Optional[VerificationResult] - timestamp: str \ No newline at end of file + timestamp: str diff --git a/core/verify.py b/core/verify.py index 3fa4a21..3c90dd5 100644 --- a/core/verify.py +++ b/core/verify.py @@ -140,4 +140,4 @@ def verify_workflow( def all_passed(results: list[VerificationResult]) -> bool: if not results: return False - return all(r.passed for r in results) \ No newline at end of file + return all(r.passed for r in results)