Language Features

PyWarnings

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

Other Methods

.filterwarnings()Neutral
#
Signature
filterwarnings(action, message, category, module, lineno, append)

Insert an entry into the list of warnings filters (at the front).

.formatwarning()Neutral
#
Signature
formatwarning(message, category, filename, lineno, line)

Function to format a warning the standard way.

.resetwarnings()Neutral
#
Signature
resetwarnings()

Clear the list of warning filters, so that no filters are active.

.showwarning()Neutral
#
Signature
showwarning(message, category, filename, lineno, file, line)

Hook to write a warning to a file; replace if you like.

.simplefilter()Neutral
#
Signature
simplefilter(action, category, lineno, append)

Insert a simple entry into the list of warnings filters (at the front).

.warn()Neutral
#
Signature
warn(message, category, stacklevel, source)

Issue a warning, or maybe ignore it or raise an exception.

.warn_explicit()Neutral
#
Signature
warn_explicit()

Low-level interface to warnings functionality.

.WarningMessage()Neutral
#
Signature
WarningMessage(...)

WarningMessage class.

.catch_warnings()Neutral
#
Signature
catch_warnings(...)

A context manager that copies and restores the warnings filter upon

Fully-Qualified Names

FQNField
warningsfqns[0]

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

Import

rule.py
import warnings