Language Features

PyContextlib

Python stdlib module — contextlib. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.asynccontextmanager()Neutral
#
Signature
asynccontextmanager(func)

@asynccontextmanager decorator.

.contextmanager()Neutral
#
Signature
contextmanager(func)

@contextmanager decorator.

.wraps()Neutral
#
Signature
wraps(wrapped, assigned, updated)

Decorator factory to apply update_wrapper() to a wrapper function

.AbstractAsyncContextManager()Neutral
#
Signature
AbstractAsyncContextManager(...)

An abstract base class for asynchronous context managers.

.AbstractContextManager()Neutral
#
Signature
AbstractContextManager(...)

An abstract base class for context managers.

.AsyncContextDecorator()Neutral
#
Signature
AsyncContextDecorator(...)

A base class or mixin that enables async context managers to work as decorators.

.AsyncExitStack()Neutral
#
Signature
AsyncExitStack(...)

Async context manager for dynamic management of a stack of exit

.ContextDecorator()Neutral
#
Signature
ContextDecorator(...)

A base class or mixin that enables context managers to work as decorators.

.ExitStack()Neutral
#
Signature
ExitStack(...)

Context manager for dynamic management of a stack of exit callbacks.

.GenericAlias()Neutral
#
Signature
GenericAlias(...)

Represent a PEP 585 generic type

Fully-Qualified Names

FQNField
contextlibfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import contextlib