Skip to content

fix: add from __future__ import annotations to 3 remaining files#7611

Open
yes-man-Guo wants to merge 1 commit into
NousResearch:mainfrom
yes-man-Guo:fix/future-annotations
Open

fix: add from __future__ import annotations to 3 remaining files#7611
yes-man-Guo wants to merge 1 commit into
NousResearch:mainfrom
yes-man-Guo:fix/future-annotations

Conversation

@yes-man-Guo

Copy link
Copy Markdown

Problem

50 files were previously fixed by adding from __future__ import annotations for PEP 604 union syntax (X | Y) compatibility, but 3 files were missed:

  • tools/budget_config.py — uses int | float
  • tools/voice_mode.py — uses AudioRecorder | TermuxAudioRecorder
  • skills/research/polymarket/scripts/polymarket.py — uses dict | list

Fix

Added from __future__ import annotations to the 3 remaining files, consistent with the previous batch fix.

Impact

Without this fix, these files could break on Python versions where PEP 604 union syntax is not supported at runtime without deferred annotation evaluation. Currently works on Python 3.10+ but this ensures broader compatibility and consistency across the codebase.

Files using PEP 604 union syntax (X | Y) without the required import:
- tools/budget_config.py (int | float)
- tools/voice_mode.py (AudioRecorder | TermuxAudioRecorder)
- skills/research/polymarket/scripts/polymarket.py (dict | list)

50 other files were already fixed in a previous batch. This catches the
remaining 3 that were missed.
@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change P3 Low — cosmetic, nice to have comp/tools Tool registry, model_tools, toolsets labels Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants