You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a py3.9 context with from __future__ import annotations, we are using keep-runtime-typing = true
to avoid application of rules like UP007 and UP045 that suggest use of X | None or X | Y syntax instead of Optional[X] and Union{X|Y].
This is to avoid issues with Pydantic while nevertheless permitting us to address forward referencing issues.
It would be valuable to actually have reciprocal rules that flag the use of non-native py3.9 type annotation syntax with from __future__ import annotations. That is, not only would X | None not be suggested, it would get flagged as an issue if observed. This would presumably be non-default behavior, but something that could be opted into.