python-trio / flake8-async

Highly opinionated linter for Trio code
https://flake8-async.readthedocs.io
MIT License
17 stars 2 forks source link

import annotations from __future__ and update annotations #78

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

Realized this is a thing ... why haven't we used this all along?? Managing typing imports have been a bit of a pain.

Also shed refactors all the annotations, so only manual step was adding the import at the top of the files :100: (and manually running shed against the .pyi files since new version hasn't been released)

I kinda want one of the checkers we use to suggest importing annotations from future whenever it encounters importing built-ins from typing

jakkdl commented 1 year ago

Ah, I figured there would be some kind of reason it's not used everywhere - makes sense.

ooh, fancy! Looking forward to doing from __future__ import co_annotations instead :smile: