Language Features

PyTextwrap

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

Other Methods

.dedent()Neutral
#
Signature
dedent(text)

Remove any common leading whitespace from every line in `text`.

.fill()Neutral
#
Signature
fill(text, width, kwargs)

Fill a single paragraph of text, returning a new string.

.indent()Neutral
#
Signature
indent(text, prefix, predicate)

Adds 'prefix' to the beginning of selected lines in 'text'.

.shorten()Neutral
#
Signature
shorten(text, width, kwargs)

Collapse and truncate the given text to fit in the given width.

.wrap()Neutral
#
Signature
wrap(text, width, kwargs)

Wrap a single paragraph of text, returning a list of wrapped lines.

.TextWrapper()Neutral
#
Signature
TextWrapper(...)

Object for wrapping/filling text. The public interface consists of

Fully-Qualified Names

FQNField
textwrapfqns[0]

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

Import

rule.py
import textwrap