A simple immutable dictionary implementation with hashing support and performance optimizations
85
{
"context": "This criteria evaluates how well the engineer uses the frozendict package's type hints and mypy support features to implement a type-safe configuration manager. The focus is on proper usage of frozendict's generic typing, PEP 561 compliance, and type annotations for static type checking.",
"type": "weighted_checklist",
"checklist": [
{
"name": "frozendict Import",
"description": "Imports frozendict from the frozendict package for creating immutable dictionaries",
"max_score": 10
},
{
"name": "Generic Type Parameters",
"description": "Uses frozendict with proper generic type parameters (frozendict[K, V] or similar) to maintain type information throughout the implementation",
"max_score": 20
},
{
"name": "Constructor Usage",
"description": "Uses frozendict constructor to create immutable dictionary instances from regular dict in __init__ method",
"max_score": 15
},
{
"name": "get Method",
"description": "Uses frozendict's get() method with proper type annotations for retrieving values with defaults in get_value()",
"max_score": 15
},
{
"name": "set Method",
"description": "Uses frozendict's set() method (copy-on-write) to create new instances with updated values in update_config()",
"max_score": 20
},
{
"name": "Type Annotations",
"description": "Includes comprehensive type hints on all methods that properly work with mypy, leveraging frozendict's PEP 561 compliance and type stubs",
"max_score": 15
},
{
"name": "Return Type Correctness",
"description": "Returns frozendict instances from get_config() method with appropriate type annotations that mypy can verify",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-frozendictevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10