fix(last-run): guard python3 absence + hoist datetime + use context manager

This commit is contained in:
Trevin Chow
2026-05-17 00:44:30 -07:00
parent dd7e6a1562
commit b296a65515
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -6,6 +6,7 @@ from __future__ import annotations
import argparse
import atexit
import datetime
import json
import os
import re
@@ -533,7 +534,6 @@ def _show_runtime_ui(
def _write_last_run(topic: str, report: "schema.Report") -> None:
try:
import datetime
if env.CONFIG_DIR is None:
return
target = env.CONFIG_DIR