Fixit
Fixit copied to clipboard
Replace `Optional[T]` and `Union[T, None]` with `T | None`
Summary
The pipe syntax for unions introduced in PEP604 is more concise than Optional, but it only works in Python 3.10+
This PR updates the rule replacing Union[T | None] with Optional[T] to replace both with T | None.
Test Plan
make