Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10: add trio[301], don't await trio.sleep inside loop #21

Merged
merged 3 commits into from
Aug 5, 2022

Conversation

jakkdl
Copy link
Member

@jakkdl jakkdl commented Aug 5, 2022

Straightforward stuff. Made it also check [async] for, and to specifically only check "trio.sleep"

@Zac-HD
Copy link
Member

Zac-HD commented Aug 5, 2022

In order to stick to cases where Event really does seem better, I'd confine this check specifically to while-loops, and only where await trio.sleep[_until](...) is the entire loop body.

@jakkdl
Copy link
Member Author

jakkdl commented Aug 5, 2022

Ah, fixed!

@Zac-HD Zac-HD force-pushed the 10_no_trio_sleep_in_loop branch from 8888019 to ea669fb Compare August 5, 2022 21:58
@Zac-HD Zac-HD force-pushed the 10_no_trio_sleep_in_loop branch from ea669fb to 3d8fdf4 Compare August 5, 2022 22:02
@Zac-HD Zac-HD merged commit 8bbbe7e into python-trio:main Aug 5, 2022
@Zac-HD
Copy link
Member

Zac-HD commented Aug 5, 2022

Nice! Straightforward as you say, modulo some brain-fog-inspired complications merging several PRs in a row 😅

@Zac-HD Zac-HD mentioned this pull request Aug 5, 2022
12 tasks
@jakkdl jakkdl deleted the 10_no_trio_sleep_in_loop branch August 23, 2022 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants