HF RL Explorer

Using attrs , implement a field introspection utility for attrs-decorated classes.

Using attrs , implement a field introspection utility for attrs-decorated classes.: a task in repo2rlenv-code-instruct (Harbor dataset). Create a function summarize fields(cls) that takes an attrs -decorated class and returns a list of dictionaries, one per field, each containing: - "name" : the…

The task

Create a function `summarize_fields(cls)` that takes an `attrs`-decorated class and returns a list of dictionaries, one per field, each containing: - `"name"`: the field's name (string) - `"has_default"`: `True` if the field has a default value or factory, `False` otherwise - `"mandatory"`: `True` if the field has no…

Part of FineEnvs/repo2rlenv-code-instruct.