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%
Implement shipping status and region code enums that deliberately exercise permissive and strict alias policies.
"PEN", "P"), in-transit ("MOVE"), delivered ("DEL", 3), and cancelled ("CXL")."PEN" and "P" both represent the pending status; either code resolves to the same member and the codes list preserves declaration order. @test"DEL" and 3 both represent the delivered status; either code resolves to the same member. @testcodes property (and via list_codes(status)), including single-code statuses ("MOVE" for in-transit, "CXL" for cancelled). @test"N", "S", "E", and "W" must each map to a single member with no aliasing; using the same value for two regions should raise during class creation instead of permitting an alias. @testValueError for any other string or numeric alias. @teststatus_from_code returns the matching shipping status for any declared code and raises ValueError for unknown codes. @testregion_from_code returns the matching region for declared codes and raises ValueError for unknown codes. @test@generates
from typing import Tuple
class ShippingStatus:
PENDING: "ShippingStatus"
IN_TRANSIT: "ShippingStatus"
DELIVERED: "ShippingStatus"
CANCELLED: "ShippingStatus"
@property
def codes(self) -> Tuple[object, ...]:
...
class RegionCode:
NORTH: "RegionCode"
SOUTH: "RegionCode"
EAST: "RegionCode"
WEST: "RegionCode"
def status_from_code(code: object) -> ShippingStatus: ...
def region_from_code(code: object) -> RegionCode: ...
def list_codes(status: ShippingStatus) -> Tuple[object, ...]: ...Provides advanced enumeration utilities for alias handling and value management.