Skip to content

fix(agents): test_compact_for_finalizer mypy index error on object return #355

@w7-mgfcode

Description

@w7-mgfcode

app/features/agents/tests/test_service.py:1264 (runs = compact[0]["result"]["runs"]) fails mypy --strict with Value of type "object" is not indexable [index] because AgentService._compact_for_finalizer is annotated -> object.

Introduced by #351 (ae25be8). Masked locally when the lightgbm/xgboost extras are absent (those import errors dominate), but CI installs the extras so it surfaces as the sole Type Check failure. Fix: cast the result to an indexable type in the test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions