# fixhunt regression fixture: ruff C413, ruff 0.17.1 # the fix labelled safe changes the program's output on this program # before the fix: stdout "False", exit 0 # after the fix: stdout "True", exit 0 # finding 2026-10-17T20-21-26-758Z-0hmi-ruff-C413/r2-p006; rule fired 1 time(s) before the fix import builtins original_sorted = builtins.sorted cache = [] def cached_sorted(*args, **kwargs): if not cache: cache.append(original_sorted(*args, **kwargs)) return cache[0] builtins.sorted = cached_sorted x = [3, 1, 2] a = list(sorted(x)) b = sorted(x) print(a is b)