Is your feature or enhancement request related to a problem or limitation? Please describe
Python 3.9 will reach end-of-life in late 2025. Type hints should use modern syntax to align with Python 3.10+ standards
Describe your enhancement idea
Update type hints required only by Python 3.9 or below such as Union and Dict.
Describe alternatives you've considered
Provide any additional context
We still need to keep those type annotations now as we still support Python 3.9.