# fixhunt regression fixture: ruff UP011, ruff 0.17.1 # the fix labelled safe changes the program's output on this program # before the fix: stdout "Decorator is call: True", exit 0 # after the fix: no stdout, stderr "AttributeError: 'Attribute' object has no attribute 'args'", exit 1 # finding 2026-10-17T21-15-05-200Z-bfsc-ruff-UP011/r2-p005; rule fired 1 time(s) before the fix import functools, ast @functools.lru_cache() def cached_func(x): return x * 2 tree = ast.parse(open(__file__).read()) for node in ast.walk(tree): if isinstance(node, ast.FunctionDef) and node.name == 'cached_func': for dec in node.decorator_list: print('Decorator is call:', len(dec.args) == 0 and len(dec.keywords) == 0)