Skip to content

include common 3rd-party CM's with internal cancel scopes in ASYNC101 #350

Open
@jakkdl

Description

@jakkdl

Motivated by python-trio/pytest-trio#148

given that we already have special handling of httpx elsewhere we should probably support it here. There's probably some other packages out there too that might merit inclusion.

Implementation is simple, we simple extend this table

and bool(
# nursery/taskgroup
with_has_call(node, "open_nursery", base="trio")
or with_has_call(node, "create_task_group", base="anyio")
or with_has_call(node, "TaskGroup", base="asyncio")
# cancel scopes
or with_has_call(node, "timeout", "timeout_at", base="asyncio")
or with_has_call(node, *cancel_scope_names, base=("trio", "anyio"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    rule improvementImprovement for currently existing rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions