tessl install tessl/pypi-varname@0.15.0Dark magics about variable names in python
Agent Success
Agent success rate when using this tile
90%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.41x
Baseline
Agent success rate without this tile
64%
Build a configuration system that automatically tracks variable assignments and method chaining patterns using Python properties.
Create a ConfigBuilder class that:
The ConfigBuilder class should have a get_config() property that:
The ConfigBuilder class should have a chain() property that:
The class should provide methods to retrieve captured information:
get_variable_names() - returns a list of all captured variable namesget_next_methods() - returns a list of all detected next method callsconfig = builder.get_config(), the builder stores "config" as a captured variable name @testbuilder.chain().save(), the builder detects and stores "save" as the next method @testconfig1 = builder.get_config() followed by config2 = builder.get_config() stores both "config1" and "config2" @testsave(), load(), and validate() that return the builder to support chaining @test@generates
class ConfigBuilder:
"""Configuration builder with self-documenting capabilities."""
def __init__(self):
"""Initialize the builder with empty tracking lists."""
pass
@property
def get_config(self):
"""Property that captures the variable name it's assigned to and returns self."""
pass
@property
def chain(self):
"""Property that detects the next method call and returns self."""
pass
def get_variable_names(self) -> list[str]:
"""Return list of all captured variable names."""
pass
def get_next_methods(self) -> list[str]:
"""Return list of all detected next method calls."""
pass
def save(self):
"""Stub method for chaining support. Returns self."""
pass
def load(self):
"""Stub method for chaining support. Returns self."""
pass
def validate(self):
"""Stub method for chaining support. Returns self."""
passProvides metaprogramming capabilities for variable name retrieval and method chain detection.
@satisfied-by