Skip to content

Commit ee6e6b3

Browse files
ShaharNavehjreback
authored andcommitted
STY: Style fix (#30066)
1 parent 0381bce commit ee6e6b3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pandas/errors/__init__.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,23 @@ class MergeError(ValueError):
156156

157157

158158
class AccessorRegistrationWarning(Warning):
159-
"""Warning for attribute conflicts in accessor registration."""
159+
"""
160+
Warning for attribute conflicts in accessor registration.
161+
"""
160162

161163

162164
class AbstractMethodError(NotImplementedError):
163-
"""Raise this error instead of NotImplementedError for abstract methods
165+
"""
166+
Raise this error instead of NotImplementedError for abstract methods
164167
while keeping compatibility with Python 2 and Python 3.
165168
"""
166169

167170
def __init__(self, class_instance, methodtype="method"):
168171
types = {"method", "classmethod", "staticmethod", "property"}
169172
if methodtype not in types:
170-
msg = f"methodtype must be one of {methodtype}, got {types} instead."
171-
raise ValueError(msg)
173+
raise ValueError(
174+
f"methodtype must be one of {methodtype}, got {types} instead."
175+
)
172176
self.methodtype = methodtype
173177
self.class_instance = class_instance
174178

@@ -177,5 +181,4 @@ def __str__(self) -> str:
177181
name = self.class_instance.__name__
178182
else:
179183
name = type(self.class_instance).__name__
180-
msg = f"This {self.methodtype} must be defined in the concrete class {name}"
181-
return msg.format(methodtype=self.methodtype, name=name)
184+
return f"This {self.methodtype} must be defined in the concrete class {name}"

0 commit comments

Comments
 (0)