I recently realised how from __future__ import annotations enables modern type hint while retaining compatibility with older Python version (I currently target 3.8+ with my project). Using pyupgrade helped a great deal to bring everything up to date, but I still had to manually add from __future__ import annotations in every file. It would be great if pyugrade had an option to do the work for me.
I recently realised how
from __future__ import annotationsenables modern type hint while retaining compatibility with older Python version (I currently target 3.8+ with my project). Usingpyupgradehelped a great deal to bring everything up to date, but I still had to manually addfrom __future__ import annotationsin every file. It would be great ifpyugradehad an option to do the work for me.