Skip to content

CLN: misc cleanups #30877

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

Merged
merged 8 commits into from
Jan 13, 2020
Merged

CLN: misc cleanups #30877

merged 8 commits into from
Jan 13, 2020

Conversation

jbrockmendel
Copy link
Member

Things I find myself doing in multiple branches.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment otherwise lgtm

@@ -2279,7 +2279,7 @@ def _from_factorized(cls, uniques, original):
original.categories.take(uniques), dtype=original.dtype
)

def equals(self, other):
def equals(self, other) -> bool:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def equals(self, other) -> bool:
def equals(self, other: Any) -> bool:

Purely stylistic but we've been typing other as Any elsewhere, so good to do here as well (applicable in a few spots)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the docstring says other is Categorical; id prefer not to introduce mismatches

@WillAyd WillAyd added Clean Typing type annotations, mypy/pyright type checking labels Jan 10, 2020
@jbrockmendel
Copy link
Member Author

reverted annotations to push the other parts down the field

@jbrockmendel
Copy link
Member Author

@WillAyd gentle ping; reverted the parts that were non-trivial

@WillAyd WillAyd added this to the 1.1 milestone Jan 13, 2020
@WillAyd WillAyd merged commit 6928327 into pandas-dev:master Jan 13, 2020
@WillAyd
Copy link
Member

WillAyd commented Jan 13, 2020

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the cln6 branch January 13, 2020 20:29
except (KeyError, TypeError, ValueError):
return False
return bool(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't the bool redundant here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not according to mypy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants