Summary
The ai module uses legacy typing import that can be replaced with Python 3.12+ built-in syntax.
File to update
Current import
from typing import Optional
Proposed change
Remove the typing import entirely and replace all Optional[X] with X | None.
Example
# Before
from typing import Optional
additional_info: Optional[str] = None
# After
additional_info: str | None = None
Priority
Medium