fix: flake8 E701 in avatar handler; update SSH test to match accept-new
Lint / Python (flake8) (push) Skipped
Lint / JS (eslint) (push) Skipped

- 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 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 09:23:06 -04:00
co-authored by Claude Sonnet 4.6
parent 41c350815a
commit e0452193ee
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -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)
+2 -2
View File
@@ -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')