Files
python-ironicclient/ironicclient
Karan Anand 5f5b2dc2c6 Add type annotations to ironicclient/common/i18n.py
This is an example of migrating a module to use type annotations,
following the gradual migration strategy.

Changes to `i18n.py`:
- Add `from __future__ import annotations`
- Add `from typing import Callable` import
- Add type annotations for translation function and variables
- Add type: ignore[no-redef] comment to suppress mypy warning about
  conditional definition of _ in try/except/else blocks

Changes to pyproject.toml:
- Add `ironicclient/common/i18n.py` to mypy files list for type checking

Change-Id: Iffd9b5aff0530c2ddde0889cc31aa99e64b7f5a2
Signed-off-by: Karan Anand <anandkarancompsci@gmail.com>
2026-02-20 21:36:10 -05:00
..