You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to enforce structured concurrency in my codebases, and a rule to forbid asyncio.create_task would be very helpful, since it would enforce all tasks are managed through TaskGroups.
This is likely to be controversial and spawn false positives so I think it should probably be disabled by default. Obviously it's possible to achieve structured concurrency even with asyncio.create_task, but I would argue you'd just be reimplementing TaskGroups.
Still, for some codebases I think a rule like this would be very useful.
The text was updated successfully, but these errors were encountered:
I can see the appeal. Unfortunately I think this is probably much too opinionated to be done until we recategorize our ruleset so that we can better distinguish highly opinionated, restrictive rules like this one from rules that nearly everybody would probably want enabled :( See #1774 for the recategorisation issue
Description
I'd like to enforce structured concurrency in my codebases, and a rule to forbid
asyncio.create_task
would be very helpful, since it would enforce all tasks are managed through TaskGroups.This is likely to be controversial and spawn false positives so I think it should probably be disabled by default. Obviously it's possible to achieve structured concurrency even with
asyncio.create_task
, but I would argue you'd just be reimplementing TaskGroups.Still, for some codebases I think a rule like this would be very useful.
The text was updated successfully, but these errors were encountered: