tweag / FawltyDeps

Python dependency checker
Other
201 stars 14 forks source link

Use __future__.annotations instead of stringified type annotations #414

Closed jherland closed 10 months ago

jherland commented 10 months ago

from __future__ import annotations became available in Python 3.7, so there is no reason for us not to use it instead of the older "stringified" type annotations (for types that are not yet declared at the time the parser encounters the annotation).

jherland commented 10 months ago

For the consistency sake, there is one more place we could use annotations. In dir_traversal.py, https://github.com/tweag/FawltyDeps/blob/1cc9202f3cc9decf277735f9e43f70497743487f/fawltydeps/dir_traversal.py#L42

Nice catch, fixed in 51da946.