Files
computer-playbook/utils/i18n/limits.py
T
kevinveenbirkenbachandClaude Opus 5 77292f9041 fix(env): keep the batch-size constant reachable without pulling in PyYAML
ac5e7d54c4 removed a duplicated literal by having the tuning handler take
BATCH_SIZE from the client that owns it. That import walks straight out of the
stdlib:

  handlers/__init__ -> i18n/tuning -> client -> languages -> cache.yaml -> yaml

and the .env generator runs on the bare bootstrap python, before any dependency
is installed. The client needs SOURCE_LANGUAGE from the language table, so it
can never satisfy that contract itself.

The constant moves into a module with no imports of its own, which the handler
README names as the allowed shape: a handler may import any repo module whose
own closure is stdlib-only. Both the client and the handler read it from there,
so the literal still exists once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 08:04:45 +02:00

11 lines
346 B
Python

"""Client limits the env generator and the translator must agree on.
They live apart from the client itself because the generator runs on the bare
bootstrap interpreter: importing the client would pull in the language table and
with it a YAML parser the generator is not allowed to need.
"""
from __future__ import annotations
BATCH_SIZE = 20