-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed mypy errors in mypy-pandas.tests.extension.decimal.test_decimal #31730
fixed mypy errors in mypy-pandas.tests.extension.decimal.test_decimal #31730
Conversation
eff526d
to
8f13e39
Compare
@@ -103,7 +105,7 @@ def assert_frame_equal(self, left, right, *args, **kwargs): | |||
decimals = (left.dtypes == "decimal").index | |||
|
|||
for col in decimals: | |||
self.assert_series_equal(left[col], right[col], *args, **kwargs) | |||
BaseDecimal.assert_series_equal(left[col], right[col], *args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like it should be a classmethod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the advantage of using classmethod
over staticmethod
? I typically only use classmethod
if I need multiple ways of instantiation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having BaseDecimal hard-coded here looks like a kludge, I'm speculating that what you want here is cls.assert_series_equal
, kind of halfway inbetween the regular method it is now and the staticmethod in the PR
lgtm outside of @jbrockmendel comments |
Part of #28926
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff