fix(file_state): drop the module-level forget_task wrapper

The wrapper (and its __all__ entry) had no production caller: the only
release path, tools/file_tools.py::clear_file_ops_cache, already goes
through file_state.get_registry().forget_task(). It existed solely for
the new registry test, which now calls get_registry().forget_task()
directly, the same path production takes.
This commit is contained in:
teknium1
2026-09-18 03:24:48 -07:00
committed by Teknium
parent 607223ab07
commit 783f854b0f
2 changed files with 2 additions and 7 deletions

View File

@@ -182,7 +182,7 @@ class FileStateRegistryUnitTests(unittest.TestCase):
registry = file_state.get_registry()
self.assertEqual(registry._last_writer[p][0], "cron:JOB:run1")
file_state.forget_task("cron:JOB:run1")
registry.forget_task("cron:JOB:run1")
self.assertNotIn(p, registry._last_writer)
self.assertIsNone(file_state.check_stale("cron:JOB:run2", p))

View File

@@ -249,10 +249,6 @@ def known_reads(task_id: str) -> List[str]:
return _registry.known_reads(task_id)
def forget_task(task_id: str) -> None:
_registry.forget_task(task_id)
__all__ = [
"FileStateRegistry",
"get_registry",
@@ -261,5 +257,4 @@ __all__ = [
"check_stale",
"lock_path",
"writes_since",
"known_reads",
"forget_task"]
"known_reads"]