Language Features

PyFunctools

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

Other Methods

.cache()Neutral
#
Signature
cache(user_function)

Simple lightweight unbounded cache. Sometimes called "memoize".

.cmp_to_key()Neutral
#
Signature
cmp_to_key()

Convert a cmp= function into a key= function.

.get_cache_token()Neutral
#
Signature
get_cache_token()

Returns the current ABC cache token.

.lru_cache()Neutral
#
Signature
lru_cache(maxsize, typed)

Least-recently-used cache decorator.

.namedtuple()Neutral
#
Signature
namedtuple(typename, field_names, rename, defaults, module)

Returns a new subclass of tuple with named fields.

.recursive_repr()Neutral
#
Signature
recursive_repr(fillvalue)

Decorator to make a repr function return fillvalue for a recursive call

.reduce()Neutral
#
Signature
reduce()

reduce(function, iterable[, initial]) -> value

.singledispatch()Neutral
#
Signature
singledispatch(func)

Single-dispatch generic function decorator.

.total_ordering()Neutral
#
Signature
total_ordering(cls)

Class decorator that fills in missing ordering methods

.update_wrapper()Neutral
#
Signature
update_wrapper(wrapper, wrapped, assigned, updated)

Update a wrapper function to look like the wrapped function

Fully-Qualified Names

FQNField
functoolsfqns[0]

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

Import

rule.py
import functools