Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants
76
{
"context": "Evaluates whether the solution leverages aenum's flag-style enums to build combinable feature presets and integer-compatible permissions as described in the spec. Emphasis is on using the package's bitmask support and automatic bit assignment rather than manual integer handling.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Flag bases",
"description": "FeatureFlag is implemented as an aenum.Flag (not plain Enum) so bitwise OR/AND/INVERT behaviors come from the package.",
"max_score": 20
},
{
"name": "Auto bits",
"description": "SEARCH, REPORTS, EXPORT, and ADMIN are assigned with aenum.auto() to produce distinct power-of-two bits without manual integers.",
"max_score": 20
},
{
"name": "Flag presets",
"description": "DEFAULT, ANALYST, and ADMINISTRATOR are defined by combining FeatureFlag members with package-provided bitwise OR so their values remain Flag instances.",
"max_score": 15
},
{
"name": "Membership checks",
"description": "has_feature relies on aenum.Flag membership semantics (e.g., flag in combined_flag or combined_flag & flag) instead of manual integer comparisons.",
"max_score": 15
},
{
"name": "IntFlag permissions",
"description": "AccessLevel subclasses aenum.IntFlag to preserve integer compatibility while supporting flag combinations for READ, WRITE, EXECUTE, and FULL.",
"max_score": 20
},
{
"name": "Int conversions",
"description": "permissions_from_int constructs AccessLevel via the IntFlag constructor (or equivalent cast) and permissions_to_int returns level.value (or int(level)) rather than manual bit math.",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-aenumevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10