Skip to content

Commit d385f6e

Browse files
committed
revert __repr__ in pandas/core/window/rolling.py
1 parent 5bc5475 commit d385f6e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/core/window/rolling.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,13 @@ def __repr__(self) -> str:
212212
"""
213213

214214
attrs = (
215-
f"{k}={getattr(self, k)}"
215+
"{k}={v}".format(k=k, v=getattr(self, k))
216216
for k in self._attributes
217217
if getattr(self, k, None) is not None
218218
)
219-
attrs = ",".join(attrs)
220-
return f"{self._window_type} [{attrs}]"
219+
return "{klass} [{attrs}]".format(
220+
klass=self._window_type, attrs=",".join(attrs)
221+
)
221222

222223
def __iter__(self):
223224
url = "https://github.com/pandas-dev/pandas/issues/11704"

0 commit comments

Comments
 (0)