Skip to content

fix(agent): type _multilingual as Optional so the None initializer checks#44

Open
jakubkarolczyk wants to merge 1 commit into
mainfrom
fix-multilingual-typing
Open

fix(agent): type _multilingual as Optional so the None initializer checks#44
jakubkarolczyk wants to merge 1 commit into
mainfrom
fix-multilingual-typing

Conversation

@jakubkarolczyk

Copy link
Copy Markdown

set_multilingual() assigns _multilingual a dict[str, Any], so mypy infers that as its type and rejects self._multilingual = None in AgentBase.__init__ (agent_base.py:289) — the TYPECHECK gate is currently red on main because of it.

Fix: declare _multilingual: dict[str, Any] | None = None explicitly on AIConfigMixin (the class that owns set_multilingual), so both the None default and the dict assignment type-check.

  • Type-only change; no runtime behavior change.
  • Whole-repo mypy after the fix: 0 findings (176 files).
  • Touches the multilingual feature added in 3a44d2e.

…ecks

set_multilingual() assigns _multilingual a dict[str, Any], so mypy inferred that
as its type and rejected 'self._multilingual = None' in AgentBase.__init__
(agent_base.py:289) — the TYPECHECK gate is red on main. Declare _multilingual
explicitly as dict[str, Any] | None on AIConfigMixin (which owns
set_multilingual), so both the None default and the dict assignment type-check.
Type-only; no behavior change. Whole-repo mypy: 0 findings.
@jakubkarolczyk jakubkarolczyk requested a review from mjerris July 2, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant