From 54357aa2a37f9cfda7d750cea8b0eef89b66d2a4 Mon Sep 17 00:00:00 2001 From: Daniel Maksymilian Syrnicki Date: Mon, 20 Apr 2026 12:41:58 +0200 Subject: [PATCH] =?UTF-8?q?style:=20ruff=20format=20=E2=80=94=20collapse?= =?UTF-8?q?=20two-line=20hostname=20file=20path=20+=20version=20loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Format-only diff from `ruff format`. The 26.5-alpha push's CI run failed on `ruff format --check`; these three files had two-line constructs that fit on one line at ruff's default line length. No behaviour change. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/test_updater.py | 4 +--- tests/test_webinstaller_assets.py | 4 +--- webinstaller/app.py | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/test_updater.py b/tests/test_updater.py index cf8c657..5813258 100644 --- a/tests/test_updater.py +++ b/tests/test_updater.py @@ -215,9 +215,7 @@ def test_refresh_caddyfile_substitutes_hostname_placeholder(updater, tmp_path): # this the named-hostname :443 block ships with a literal # `__FURTKA_HOSTNAME__` and Caddy refuses to load the config. src = tmp_path / "src" - src.write_text( - "__FURTKA_HOSTNAME__.local, __FURTKA_HOSTNAME__ {\n\ttls internal\n}\n" - ) + src.write_text("__FURTKA_HOSTNAME__.local, __FURTKA_HOSTNAME__ {\n\ttls internal\n}\n") assert updater._refresh_caddyfile(src) is True live = updater._CADDYFILE_LIVE.read_text() assert "testbox.local, testbox {" in live diff --git a/tests/test_webinstaller_assets.py b/tests/test_webinstaller_assets.py index 5b82249..b4b022e 100644 --- a/tests/test_webinstaller_assets.py +++ b/tests/test_webinstaller_assets.py @@ -172,9 +172,7 @@ def test_post_install_substitutes_hostname_in_caddyfile(install_cmds): # with the hostname the user picked in the form. The `testhost` value # comes from the install_cmds fixture. Without substitution Caddy's # `tls internal` never issues a leaf cert for the real hostname. - caddyfile_cmd = next( - (c for c in install_cmds if " > /etc/caddy/Caddyfile" in c), None - ) + caddyfile_cmd = next((c for c in install_cmds if " > /etc/caddy/Caddyfile" in c), None) assert caddyfile_cmd is not None written = _extract_written_content(caddyfile_cmd, "/etc/caddy/Caddyfile") assert "__FURTKA_HOSTNAME__" not in written diff --git a/webinstaller/app.py b/webinstaller/app.py index be4cafe..0392192 100644 --- a/webinstaller/app.py +++ b/webinstaller/app.py @@ -49,6 +49,7 @@ FURTKA_VERSION = _resolve_version() def _inject_version(): return {"furtka_version": FURTKA_VERSION} + LANGUAGES = { "en": {"locale": "en_US.UTF-8", "label": "English", "keyboard": "us"}, "de": {"locale": "de_DE.UTF-8", "label": "Deutsch", "keyboard": "de"},