-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: handle mypy ignore in pandas/_testing #38236
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
Conversation
It's green, except failing |
pandas/_testing.py
Outdated
compress_method = get_lzma_file(lzma) | ||
else: | ||
raise ValueError(f"Unrecognized compression type: {compression}") | ||
compress_method = _select_compress_method(compression) |
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.
i think you could leave this inline and just type compress_method no?
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.
I guess so.
I just thought that some small function extraction will be helpful here.
But if you suggest against the extraction, I can definitely do that way as well.
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.
I would prefer for this to stay inline as well
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.
I inlined the function and also slid the conditionals. Can revert if this is not what you expect, but in my opinion, it simplifies the understanding that zip
has a different signature as compared to other compression methods.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Handle mypy ignore comments in
pandas/_testing.py
, functionwrite_to_compressed
.