python-trio / flake8-async

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

don't raise TRIO200 if the call is immediately awaited. #90

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

Fixes #85

Maybe nicer to rename the variable as well, but didn't immediately come up with a great name and class is small enough it won't really matter.

jakkdl commented 1 year ago

Made a minor runner change that also cleaned up 105, which also checks whether calls are directly awaited.

There's a couple false alarms, but I'm not sure if any of them are more than just theoretical false alarms. But if you encounter any of those, or others, it should be fairly easy to fix.