HF RL Explorer

Implement a function count class inferred attrs(code) that leverages astroid to analyze Python source…

Implement a function count class inferred attrs(code) that leverages astroid to analyze Python source…: a task in r2e-code-instruct-qwen3.5 (Harbor dataset). Examples: Input: import collections; x = collections.OrderedDict() - Output: 1 Input: os.path.join() - Output: 0 (function, not class)…

The task

Examples: Input: `import collections; x = collections.OrderedDict()` -> Output: 1 Input: `os.path.join()` -> Output: 0 (function, not class) Input: `x.y` (undefined x) -> Raises `InferenceError`

Part of Essacheez/r2e-code-instruct-qwen3.5.