tessl install tessl/pypi-aenum@3.1.0Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants
Agent Success
Agent success rate when using this tile
76%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.21x
Baseline
Agent success rate without this tile
63%
{
"context": "Evaluates whether the solution uses aenum's NamedConstant/Constant to build immutable payment status constants with built-in name/value metadata, by-value lookups, and ordered iteration. Checks focus on leveraging aenum primitives instead of hand-rolled dictionaries or ad hoc immutability guards.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses NamedConstant",
"description": "PaymentStatus is declared as a subclass of aenum.NamedConstant or aenum.Constant, not a plain class or Enum, ensuring the library's constant behaviors are active.",
"max_score": 25
},
{
"name": "Built-in lookup",
"description": "status_from_code delegates to aenum's by-value resolution (e.g., PaymentStatus(code) or accessing value-to-member maps) rather than maintaining a separate manual dictionary, and raises ValueError for unknown codes.",
"max_score": 25
},
{
"name": "Immutability guard",
"description": "Relies on NamedConstant/Constant's prevention of attribute rebinding or deletion (AttributeError on set/del) instead of custom setter overrides or defensive copies.",
"max_score": 20
},
{
"name": "Name/value usage",
"description": "Retrieves status metadata via the NamedConstant member interfaces (name/value attributes) rather than duplicating labels or codes in parallel structures.",
"max_score": 15
},
{
"name": "Library iteration",
"description": "list_status_codes derives ordering from NamedConstant's member iteration (e.g., list(PaymentStatus) or PaymentStatus.__members__.items()) instead of hardcoded lists.",
"max_score": 15
}
]
}