python-trio / flake8-async

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

add TRIO113, nursery.start_soon() in async context manager #60

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

Fixes #57

Quick and dirty:

jakkdl commented 1 year ago

huh, test failures looks like it's an issue with the CI?

jakkdl commented 1 year ago

huh, test failures looks like it's an issue with the CI?

nvm, the warning was unrelated. But I'd forgotten to push the test file :upside_down_face:

jakkdl commented 1 year ago

Should be pretty much done now, other than what to do with the function signature on __aenter__

Zac-HD commented 1 year ago

👀 looks like flake8 6.0.0 just came out with a new required argument in some logic we use for tests... fixing now.

jakkdl commented 1 year ago

Looks good :rocket:

Zac-HD commented 1 year ago

Found two bugs with it right away 💪

Also looks like chasing down some similar patterns will result in follow-ups, so expect more issues next week 😅

jakkdl commented 1 year ago

Awesome!

Haha, wonderful :grin:

Zac-HD commented 1 year ago

Follow up PR please?

The other thing it could cover is the idiom of using [functools]partial() to pass keyword arguments through - it'd be great to check nursery.start_soon(partial(trio.run_process, cmd, shell=True)) by "seeing through" the call to partial.

jakkdl commented 1 year ago

Will do :+1: