I/O & Encoding

PyDifflib

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

Other Methods

.IS_CHARACTER_JUNK()Neutral
#
Signature
IS_CHARACTER_JUNK(ch, ws)

Return True for ignorable character: iff `ch` is a space or tab.

.IS_LINE_JUNK()Neutral
#
Signature
IS_LINE_JUNK(line, pat)

Return True for ignorable line: iff `line` is blank or contains a single '#'.

.context_diff()Neutral
#
Signature
context_diff(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)

Compare two sequences of lines; generate the delta as a context diff.

.diff_bytes()Neutral
#
Signature
diff_bytes(dfunc, a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)

Compare `a` and `b`, two sequences of lines represented as bytes rather

.get_close_matches()Neutral
#
Signature
get_close_matches(word, possibilities, n, cutoff)

Use SequenceMatcher to return list of the best "good enough" matches.

.ndiff()Neutral
#
Signature
ndiff(a, b, linejunk, charjunk)

Compare `a` and `b` (lists of strings); return a `Differ`-style delta.

.restore()Neutral
#
Signature
restore(delta, which)

Generate one of the two sequences that generated a delta.

.unified_diff()Neutral
#
Signature
unified_diff(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)

Compare two sequences of lines; generate the delta as a unified diff.

.Differ()Neutral
#
Signature
Differ(...)

Differ is a class for comparing sequences of lines of text, and

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

Represent a PEP 585 generic type

Fully-Qualified Names

FQNField
difflibfqns[0]

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

Import

rule.py
import difflib