Skip to content

fix: use proper typing.Any and typing.Callable in type annotations#32985

Open
Kailigithub wants to merge 1 commit into
NousResearch:mainfrom
Kailigithub:fix/type-annotation-any-callable
Open

fix: use proper typing.Any and typing.Callable in type annotations#32985
Kailigithub wants to merge 1 commit into
NousResearch:mainfrom
Kailigithub:fix/type-annotation-any-callable

Conversation

@Kailigithub

Copy link
Copy Markdown
Contributor

Summary

Fixes three type annotation issues identified during a code audit (items 10 and 13 in issue #32848):

  • toolset_distributions.py:223Dict[str, any]Dict[str, Any]
  • cli.py:2835value: anyvalue: Any
  • agent/conversation_loop.py:269Optional[callable]Optional[Callable[..., Any]]
  • plugins/disk-cleanup/disk_cleanup.py:343Optional[callable]Optional[Callable[..., Any]]

In each case, the lowercase builtin (any / callable) was used instead of the proper typing module types. While these work at runtime due to Python's late binding, they are incorrect type annotations.

Testing

  • python3 -m py_compile on all four files — passes
  • ruff check on all four files — clean
  • git diff --check — clean

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins labels May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants