MutaFix run: toolz-012

ranker nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B · patcher nvidia/nemotron-3-super-120b-a12b · via Nebius Token Factory

fixedoutcome
4swall time
2model calls
$0.0003API cost
Benchmark ground truth (hidden from the agent)
toolz/_signatures.py:750 · operator NEGCOND · function toolz/_signatures.py::_has_varargs
- elif not (any(checks)):   (injected bug)+ elif any(checks):   (original)
retriever rank 1 of 20 · ranker position 1 · patched the right function yes · exact restore no

Trace

reproduce
+0.43s
1 failing test(s) · 1 failed, 185 passed, 1 skipped, 1 deselected · 0.43s
failing tests and errors
toolz/tests/test_inspect_args.py::test_has_varargs
toolz/tests/test_inspect_args.py::test_has_varargs
E   assert False is None
E    +  where False = has_varargs(max)
trace
+0.79s
re-ran 1 test file(s) with the trace plugin: 1 failing and 16 passing tests, 4 library functions ran in a failing test · 0.33s
toolz/tests/test_inspect_args.py
retrieve
+0.79s
161 functions indexed, 8 reachable from toolz/tests/test_inspect_args.py::test_has_varargs in the static call graph. Kept 20 candidates, ranked by spectrum score (Ochiai), call graph and BM25 break ties.
candidates in retriever order
  1. toolz/_signatures.py::_has_varargs call depth 2 · Ochiai 0.71 (failing 1, passing 1)
  2. toolz/_signatures.py::check_varargs call depth 3 · Ochiai 0.71 (failing 1, passing 1)
  3. toolz/functoolz.py::has_varargs call depth 1 · Ochiai 0.38 (failing 1, passing 6)
  4. toolz/functoolz.py::_check_sigspec call depth 2 · Ochiai 0.25 (failing 1, passing 15)
  5. toolz/functoolz.py::_check_sigspec call depth 2 · Ochiai 0.00 (failing 0, passing 0)
  6. toolz/functoolz.py::curry.func call depth 2 · Ochiai 0.00 (failing 0, passing 5)
  7. toolz/functoolz.py::Compose.__signature__ call depth 3 · Ochiai 0.00 (failing 0, passing 0)
  8. toolz/functoolz.py::curry.__signature__ call depth 3 · Ochiai 0.00 (failing 0, passing 4)
  9. toolz/functoolz.py::curry._should_curry call depth - · Ochiai 0.00 (failing 0, passing 3)
  10. toolz/functoolz.py::is_arity call depth - · Ochiai 0.00 (failing 0, passing 2)
  11. toolz/curried/exceptions.py::merge call depth - · Ochiai 0.00 (failing 0, passing 0)
  12. toolz/curried/exceptions.py::merge_with call depth - · Ochiai 0.00 (failing 0, passing 0)
  13. toolz/_signatures.py::get_exclude_keywords call depth - · Ochiai 0.00 (failing 0, passing 1)
  14. toolz/__init__.py::__getattr__ call depth - · Ochiai 0.00 (failing 0, passing 1)
  15. toolz/functoolz.py::apply call depth - · Ochiai 0.00 (failing 0, passing 0)
  16. toolz/functoolz.py::curry.__init__ call depth - · Ochiai 0.00 (failing 0, passing 4)
  17. toolz/itertoolz.py::partition_all call depth - · Ochiai 0.00 (failing 0, passing 0)
  18. toolz/functoolz.py::memoize call depth - · Ochiai 0.00 (failing 0, passing 0)
  19. toolz/functoolz.py::curry.__call__ call depth - · Ochiai 0.00 (failing 0, passing 3)
  20. toolz/functoolz.py::memoize.<locals>.key call depth - · Ochiai 0.00 (failing 0, passing 0)
rank
+0.79s
spectrum order kept (no model call)
  1. toolz/_signatures.py::_has_varargs
  2. toolz/_signatures.py::check_varargs
  3. toolz/functoolz.py::has_varargs
  4. toolz/functoolz.py::_check_sigspec
  5. toolz/functoolz.py::_check_sigspec
read
+1.95s
turn 1 · NVIDIA-Nemotron-3-Nano-30B-A3B · 1792 in / 75 out · 1.16s · $0.00013

read toolz/_signatures.py::_has_varargs

The failing test expects has_varargs(max) to return None, but the current implementation returns False. The bug is in _has_varargs where it returns False instead of None when not all checks pass. This needs to be fixed to match the test expectation.

patch
+4.41s
turn 2 · NVIDIA-Nemotron-3-Nano-30B-A3B · 2039 in / 118 out · 1.8s · $0.00015

The current code returns False when some checks pass but not all, but the test expects None for cases like max. The fix ensures that when not all checks pass (whether some pass or none), it returns None, which matches the test expectation.

--- a/toolz/_signatures.py+++ b/toolz/_signatures.py@@ -750,4 +750,6 @@     elif not (any(checks)):         return None+    else:+        return None     return False 

tests: all tests pass 186 passed, 1 skipped, 1 deselected

Final patch

--- a/toolz/_signatures.py+++ b/toolz/_signatures.py@@ -750,4 +750,6 @@     elif not (any(checks)):         return None+    else:+        return None     return False