refactor: enforce BasedPyright strict type checking (#5158)

This commit is contained in:
chengyongru
2026-07-29 21:37:11 +08:00
committed by GitHub
parent e703481755
commit 757ad9c764
166 changed files with 4728 additions and 2621 deletions
+11
View File
@@ -65,6 +65,17 @@ def test_load_jobs_accepts_snake_case_schedule_and_run_history(tmp_path) -> None
assert jobs[0].state.run_history[0].duration_ms == 12
def test_cron_job_from_dict_rejects_malformed_run_history() -> None:
with pytest.raises(TypeError):
CronJob.from_dict(
{
"id": "j1",
"name": "t",
"state": {"run_history": [None]},
}
)
def test_load_jobs_coerces_string_schedule_and_state_ms(tmp_path) -> None:
store_path = tmp_path / "cron" / "jobs.json"
store_path.parent.mkdir(parents=True)