Utilities

PyPprint

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

Other Methods

.isreadable()Neutral
#
Signature
isreadable(object)

Determine if saferepr(object) is readable by eval().

.isrecursive()Neutral
#
Signature
isrecursive(object)

Determine if object requires a recursive representation.

.pformat()Neutral
#
Signature
pformat(object, indent, width, depth, compact, sort_dicts, underscore_numbers)

Format a Python object into a pretty-printed representation.

.pp()Neutral
#
Signature
pp(object, args, sort_dicts, kwargs)

Pretty-print a Python object

.pprint()Neutral
#
Signature
pprint(object, stream, indent, width, depth, compact, sort_dicts, underscore_numbers)

Pretty-print a Python object to a stream [default is sys.stdout].

.saferepr()Neutral
#
Signature
saferepr(object)

Version of repr() which can handle recursive data structures.

.PrettyPrinter()Neutral
#
Signature
PrettyPrinter(...)

PrettyPrinter class.

Fully-Qualified Names

FQNField
pprintfqns[0]

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

Import

rule.py
import pprint