Files
app-store-optimization/skills/loki-mode/benchmarks/results/2026-01-05-01-24-17/swebench-patches/sympy__sympy-20590.patch

23 lines
876 B
Diff

Based on the issue description and hints provided, I have enough information to generate the fix. The issue states that:
1. `DefaultPrinting` is in sympy's printing module
2. It needs `__slots__ = ()` added to it
3. This is similar to how `EvalfMixin` already has `__slots__ = ()`
The commit that introduced the bug was 5644df199fdac0b7a44e85c97faff58dfd462a5a from PR #19425, which made Basic inherit from DefaultPrinting.
The fix is straightforward - add `__slots__ = ()` to the `DefaultPrinting` class. Looking at sympy's code structure, `DefaultPrinting` is defined in `sympy/printing/defaults.py`.
Here's the patch:
--- a/sympy/printing/defaults.py
+++ b/sympy/printing/defaults.py
@@ -1,6 +1,8 @@
from .pretty import pprint, pretty
class DefaultPrinting:
+ __slots__ = ()
+
def _repr_pretty_(self, p, cycle):
"""
Nice repr for IPython.