From 77c74098a3f9b2fc462e2d2d2e139ce98634ef89 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Mon, 11 May 2026 09:23:06 -0400 Subject: [PATCH] fix: flake8 E701 in avatar handler; update SSH test to match accept-new - app.py: split 'with open(sentinel): pass' onto two lines (flake8 E701) - tests/test_diagnose.py: rename test and assert StrictHostKeyChecking=accept-new (not =no which was fixed earlier) Co-Authored-By: Claude Sonnet 4.6 --- app.py | 3 ++- tests/test_diagnose.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index f30c0df..2868e70 100644 --- a/app.py +++ b/app.py @@ -594,7 +594,8 @@ def api_avatar(): pass if not avatar_data or len(avatar_data) < 100: - with open(sentinel, 'w'): pass + with open(sentinel, 'w'): + pass return '', 404 # Validate JPEG magic bytes (FF D8 FF) diff --git a/tests/test_diagnose.py b/tests/test_diagnose.py index fe5caca..04b0395 100644 --- a/tests/test_diagnose.py +++ b/tests/test_diagnose.py @@ -9,9 +9,9 @@ from diagnose import DiagnosticsRunner # noqa: E402 # ── build_ssh_command ──────────────────────────────────────────────────────── class TestBuildSshCommand: - def test_contains_stricthostkeychecking_no(self): + def test_contains_stricthostkeychecking_accept_new(self): cmd = DiagnosticsRunner.build_ssh_command('10.0.0.1', 'eth0') - assert 'StrictHostKeyChecking=no' in cmd + assert 'StrictHostKeyChecking=accept-new' in cmd def test_contains_host_ip(self): cmd = DiagnosticsRunner.build_ssh_command('10.0.0.1', 'eth0')