Skip to content

Fix meta-agent class lookup typing - #4128

Merged
EwoutH merged 1 commit into
mesa:mainfrom
EwoutH:fix-meta-agent-typing-followup
Nov 16, 2026
Merged

EwoutH merged 1 commit into
mesa:mainfrom
EwoutH:fix-meta-agent-typing-followup

Conversation

@EwoutH

@EwoutH EwoutH commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Small follow-up fix in meta agents.

Bug / Issue

Follow-up to #4034 and #4034 (comment).

Implementation

Moves the cast to the existing-class lookup in _create_meta_agent_instance() and removes the redundant cast from _build_meta_agent_class(). One source file changed.

Testing

  • mypy --follow-imports=silent --ignore-missing-imports --no-incremental mesa/experimental/meta_agents/meta_agent.py mesa/experimental/meta_agents/meta_agents_api.py: errors decrease from five to one. The four errors introduced by typing: type hint meta-agent instance creation #4034 are resolved; the existing _membership_api.dissolve union-attribute error remains.
  • pytest -q -Werror -Wdefault::PendingDeprecationWarning tests/test_meta_agents.py tests/test_meta_agents_api.py tests/test_multi_level_meta_agents.py: 61 passed.
  • Ruff check, Ruff format check and git diff --check pass.

@github-actions github-actions Bot added the experimental Release notes label label Nov 16, 2026
@EwoutH
EwoutH marked this pull request as ready for review November 16, 2026 22:28
@EwoutH EwoutH added the ignore-for-release PRs that aren't included in the release notes label Nov 16, 2026
@EwoutH
EwoutH merged commit 82c1e36 into mesa:main Nov 16, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experimental Release notes label ignore-for-release PRs that aren't included in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant