From f8368ca861e4bf7fe289f31895b93419a9399719 Mon Sep 17 00:00:00 2001 From: Levi Neuwirth Date: Sat, 18 Apr 2026 17:49:44 -0400 Subject: [PATCH] apply ruff format to recent commits Pure formatter drift picked up after running ruff format across the tree. No behavioural changes: line-length unwrapping where strings fit on one line, one blank-line separator added to _model.py. --- src/neuropose/_model.py | 1 + src/neuropose/cli.py | 9 ++------- tests/unit/test_migrations.py | 20 +++++--------------- tests/unit/test_reset.py | 4 +--- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/src/neuropose/_model.py b/src/neuropose/_model.py index 32ed7d7..68c6261 100644 --- a/src/neuropose/_model.py +++ b/src/neuropose/_model.py @@ -68,6 +68,7 @@ class LoadedModel: sha256: str filename: str + # --------------------------------------------------------------------------- # Model artifact: pinned URL and checksum. # --------------------------------------------------------------------------- diff --git a/src/neuropose/cli.py b/src/neuropose/cli.py index 9ff2729..12feaef 100644 --- a/src/neuropose/cli.py +++ b/src/neuropose/cli.py @@ -524,9 +524,7 @@ def reset( typer.echo("would stop: no daemon or monitor running") if preview.removed_paths: size_mb = preview.bytes_freed / (1024 * 1024) - typer.echo( - f"would remove: {len(preview.removed_paths)} path(s) ({size_mb:.1f} MB)" - ) + typer.echo(f"would remove: {len(preview.removed_paths)} path(s) ({size_mb:.1f} MB)") for path in preview.removed_paths: typer.echo(f" {path}") else: @@ -574,10 +572,7 @@ def reset( raise typer.Exit(code=EXIT_USAGE) size_mb = report.wipe.bytes_freed / (1024 * 1024) - typer.echo( - f"removed {len(report.wipe.removed_paths)} path(s) " - f"({size_mb:.1f} MB freed)" - ) + typer.echo(f"removed {len(report.wipe.removed_paths)} path(s) ({size_mb:.1f} MB freed)") # --------------------------------------------------------------------------- diff --git a/tests/unit/test_migrations.py b/tests/unit/test_migrations.py index ef4f638..a7d8fef 100644 --- a/tests/unit/test_migrations.py +++ b/tests/unit/test_migrations.py @@ -201,9 +201,7 @@ class TestMigrateVideoPredictions: "added_in_v3": "beta", } - def test_missing_intermediate_migration_raises( - self, monkeypatch: pytest.MonkeyPatch - ) -> None: + def test_missing_intermediate_migration_raises(self, monkeypatch: pytest.MonkeyPatch) -> None: """If CURRENT advances past a version with no registered migration, fail loud.""" monkeypatch.setattr(migrations, "CURRENT_VERSION", 3) # Only v1 -> v2 registered; v2 -> v3 is the missing link. @@ -223,9 +221,7 @@ class TestMigrateVideoPredictions: del fake_two_version_chain caplog.set_level(logging.INFO, logger="neuropose.migrations") migrate_video_predictions({"schema_version": 1}) - assert any( - "Migrating VideoPredictions" in record.message for record in caplog.records - ) + assert any("Migrating VideoPredictions" in record.message for record in caplog.records) def test_starting_from_current_logs_nothing( self, @@ -235,9 +231,7 @@ class TestMigrateVideoPredictions: del fake_two_version_chain caplog.set_level(logging.INFO, logger="neuropose.migrations") migrate_video_predictions({"schema_version": 2}) - assert not any( - "Migrating" in record.message for record in caplog.records - ) + assert not any("Migrating" in record.message for record in caplog.records) # --------------------------------------------------------------------------- @@ -294,9 +288,7 @@ class TestMigrateJobResults: class TestRegistration: - def test_duplicate_registration_raises( - self, monkeypatch: pytest.MonkeyPatch - ) -> None: + def test_duplicate_registration_raises(self, monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr(migrations, "_VIDEO_PREDICTIONS_MIGRATIONS", {}) @migrations.register_video_predictions_migration(from_version=1) @@ -309,9 +301,7 @@ class TestRegistration: def _second(p: dict) -> dict: return p - def test_decorator_returns_callable_unchanged( - self, monkeypatch: pytest.MonkeyPatch - ) -> None: + def test_decorator_returns_callable_unchanged(self, monkeypatch: pytest.MonkeyPatch) -> None: """The decorator must not wrap or rename the function.""" monkeypatch.setattr(migrations, "_VIDEO_PREDICTIONS_MIGRATIONS", {}) diff --git a/tests/unit/test_reset.py b/tests/unit/test_reset.py index d2b35ed..9127137 100644 --- a/tests/unit/test_reset.py +++ b/tests/unit/test_reset.py @@ -158,9 +158,7 @@ class TestTerminateProcesses: assert {p.pid for p in report.stopped} == {10, 20} assert report.survivors == [] - def test_survivors_reported_when_force_kill_off( - self, monkeypatch: pytest.MonkeyPatch - ) -> None: + def test_survivors_reported_when_force_kill_off(self, monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setattr("os.kill", lambda pid, sig: None) # Process 10 always alive; process 20 dies after SIGINT. alive = {10}