Create new ASYNC3xx
rules to account for asyncio's different cancellation semantics?
#257
Labels
help wanted
Extra attention is needed
In #211, we noted that
ASYNC102
(await-in-finally-or-cancelled) is specific to Trio/AnyIO style "level-triggered" cancellation semantics.Asyncio has a pretty different system, where cancellation is an event rather than a state (well, mostly - on Python 3.11+ there's also Task.uncancel() to reverse the state change, on 3.10 and earlier you can only partly uncancel).
If someone works out a good lint rule, or set of rules, for asyncio-style cancellation semantics, we'd be happy to accept them as
ASYNC3xx
rules and makeASYNC102
specific to Trio and AnyIO.The text was updated successfully, but these errors were encountered: