Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sbobryshev
Copy link

Switch to immutable types and add typing.Final for constants per PEP 591

Motivation and Context

Using immutable structures like tuples with Literal types allows for more precise type checking.
Instead of a generic list[str], which only indicates a list of strings, the new approach infers specific literal values (e.g., tuple[Literal['2024-11-05'], Literal['2025-03-26'], Literal['2025-06-18']]).

How Has This Been Tested?

uv run pyright

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@sbobryshev sbobryshev requested review from a team as code owners September 10, 2025 20:49
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.

1 participant