From ee561f0a9d5ae1f1168021d7dc79be09bbeac2e7 Mon Sep 17 00:00:00 2001 From: Asher Feldman <59994+asher@users.noreply.github.com> Date: Sun, 13 Sep 2026 15:53:49 -0700 Subject: [PATCH] chore(typing): from __future__ import annotations in the last six annotated modules --- gmlx/__main__.py | 2 ++ gmlx/cache/kv_policy.py | 2 ++ gmlx/serve/batch_rows.py | 2 ++ gmlx/serve/kv_policy.py | 2 ++ gmlx/serve/step_timing.py | 2 ++ gmlx/spec/helpers.py | 2 ++ 6 files changed, 12 insertions(+) diff --git a/gmlx/__main__.py b/gmlx/__main__.py index a5ffe68b..39a8b991 100644 --- a/gmlx/__main__.py +++ b/gmlx/__main__.py @@ -2,6 +2,8 @@ script). A lazy import keeps ``-m gmlx `` light; this is also the form the background / launchd re-exec uses, so it must route to the umbrella (note that ``-m gmlx.commands.cli`` runs ``run``'s ``main`` instead).""" +from __future__ import annotations + import sys diff --git a/gmlx/cache/kv_policy.py b/gmlx/cache/kv_policy.py index 762a56b8..3958e6f1 100644 --- a/gmlx/cache/kv_policy.py +++ b/gmlx/cache/kv_policy.py @@ -6,6 +6,8 @@ logging, and memory pricing all read the same object. """ +from __future__ import annotations + from dataclasses import dataclass VALID_BITS = (2, 3, 4, 6, 8) diff --git a/gmlx/serve/batch_rows.py b/gmlx/serve/batch_rows.py index 71531109..a16f826d 100644 --- a/gmlx/serve/batch_rows.py +++ b/gmlx/serve/batch_rows.py @@ -16,6 +16,8 @@ of the batch as it currently is. """ +from __future__ import annotations + def batch_rows(gen) -> int: """Active rows in ``gen._generation_batch``; 0 when there is none. diff --git a/gmlx/serve/kv_policy.py b/gmlx/serve/kv_policy.py index 9354a00a..f9b1ffba 100644 --- a/gmlx/serve/kv_policy.py +++ b/gmlx/serve/kv_policy.py @@ -6,6 +6,8 @@ object. An error verdict fails residency with the reason. """ +from __future__ import annotations + import logging import math import os diff --git a/gmlx/serve/step_timing.py b/gmlx/serve/step_timing.py index e3a84332..e8ebb50d 100644 --- a/gmlx/serve/step_timing.py +++ b/gmlx/serve/step_timing.py @@ -18,6 +18,8 @@ (above the batch generator). No-op unless the env var is set. """ +from __future__ import annotations + import atexit import os import sys diff --git a/gmlx/spec/helpers.py b/gmlx/spec/helpers.py index c23a621d..5a44d386 100644 --- a/gmlx/spec/helpers.py +++ b/gmlx/spec/helpers.py @@ -9,6 +9,8 @@ Logic is a faithful copy (acceptance must stay token-identical to the validated path); keep it in sync when mlx-vlm's round changes in a way we want to track. """ +from __future__ import annotations + import logging import os from dataclasses import dataclass