Language Features

PyEnum

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

Other Methods

.bin()Neutral
#
Signature
bin(num, max_bits)

Like built-in bin(), except negative values are represented in

.global_enum()Neutral
#
Signature
global_enum(cls, update_str)

decorator that makes the repr() of an enum member reference its module

.global_enum_repr()Neutral
#
Signature
global_enum_repr(self)

use module.enum_name instead of class.enum_name

.global_flag_repr()Neutral
#
Signature
global_flag_repr(self)

use module.flag_name instead of class.flag_name

.global_str()Neutral
#
Signature
global_str(self)

use enum_name instead of class.enum_name

.pickle_by_enum_name()Neutral
#
Signature
pickle_by_enum_name(self, proto)

pickle_by_enum_name function.

.pickle_by_global_name()Neutral
#
Signature
pickle_by_global_name(self, proto)

pickle_by_global_name function.

.reduce()Neutral
#
Signature
reduce()

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

.show_flag_values()Neutral
#
Signature
show_flag_values(value)

show_flag_values function.

.unique()Neutral
#
Signature
unique(enumeration)

Class decorator for enumerations ensuring unique member values.

Fully-Qualified Names

FQNField
enumfqns[0]

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

Import

rule.py
import enum