Dark magics about variable names in python
Overall
score
90%
{
"context": "This criteria evaluates how well the engineer uses the varname package's ignore functionality to filter out specific modules and functions when capturing variable names. The focus is on proper usage of the ignore parameter with varname() to handle frame navigation through wrapper functions and modules.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Imports varname",
"description": "Correctly imports the varname function from the varname package (e.g., 'from varname import varname')",
"max_score": 10
},
{
"name": "Uses varname()",
"description": "Calls varname() function to retrieve the variable name in the create() method",
"max_score": 20
},
{
"name": "Module ignore parameter",
"description": "Uses the ignore parameter with module names to filter out wrapper modules (e.g., 'varname(ignore=...)' or building an ignore list with modules)",
"max_score": 25
},
{
"name": "Function ignore parameter",
"description": "Uses the ignore parameter with function names to filter out wrapper functions (e.g., passing function references or qualified names to ignore)",
"max_score": 25
},
{
"name": "Combined ignore patterns",
"description": "Correctly combines both module and function ignore patterns in a single ignore parameter, allowing simultaneous filtering of multiple patterns",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-varnameevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10