Skip to content

feat: standardize strict type hints for context managers and settings#306

Open
rayrishu19-wq wants to merge 3 commits intoAlishahryar1:mainfrom
rayrishu19-wq:feat/standardize-typing-standardization
Open

feat: standardize strict type hints for context managers and settings#306
rayrishu19-wq wants to merge 3 commits intoAlishahryar1:mainfrom
rayrishu19-wq:feat/standardize-typing-standardization

Conversation

@rayrishu19-wq
Copy link
Copy Markdown

@rayrishu19-wq rayrishu19-wq commented May 1, 2026

Standardizes type hints across multiple components to improve maintainability and developer experience. Closes #305.

Changes:

  • Core: Added explicit TracebackType hints to StrictSlidingWindowLimiter.__aexit__.
    • Config: Tightened type hints for optional string and log cap validators in Settings.
    • Config: Improved the Ollama base URL validation error message to clearly separate instructions from technical justification.
    • Messaging: Added AsyncIterator[None] return type to MessageTree.with_lock.
    • API: Added AsyncIterator[None] return type to lifespan.
      These changes ensure consistency with the project's strict typing policy (AGENTS.md) and provide better IDE support for core context managers.

This commit improves type-safety and consistency across core, config, messaging, and api components. Reference Issue Alishahryar1#305.
Ported from Alishahryar1#289 to consolidate DX improvements into a single comprehensive PR. Reference Issue Alishahryar1#305.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize strict type hints for context managers and settings

1 participant