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.
This commit is contained in:
parent
bcce5315be
commit
f8368ca861
|
|
@ -68,6 +68,7 @@ class LoadedModel:
|
|||
sha256: str
|
||||
filename: str
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Model artifact: pinned URL and checksum.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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)")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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", {})
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue