-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
CI: Address linting errors in flake8 >= 3.8.1 #34152
Conversation
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.
also merge master
pandas/core/internals/concat.py
Outdated
@@ -443,7 +443,10 @@ def _is_uniform_join_units(join_units: List[JoinUnit]) -> bool: | |||
# cannot necessarily join | |||
return ( | |||
# all blocks need to have the same type | |||
all(type(ju.block) is type(join_units[0].block) for ju in join_units) | |||
all( | |||
type(ju.block) is type(join_units[0].block) # noqa: E721 |
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.
instead use instance
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.
Thanks, I wasn't sure in this in this case if the exact type was actually important. Will update.
d615434
to
61b87cb
Compare
b3c74b5
to
387fe1f
Compare
387fe1f
to
49a038c
Compare
great, does this complete the flake issues? e.g. can we unpin after this one? |
It fixes all the issues with flake8 in the code, but it unfortunately doesn't fix the issue with flake8-rst flake8-docs/flake8-rst#22. That's a problem with the So, no, until |
ok thanks. |
@meeseeksdev backport to 1.0.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
@jorisvandenbossche will start backporting this or could pin flake8 on 1.0.x? lmk |
…)" This reverts commit f196e8d.
@@ -443,7 +443,7 @@ def _is_uniform_join_units(join_units: List[JoinUnit]) -> bool: | |||
# cannot necessarily join | |||
return ( | |||
# all blocks need to have the same type | |||
all(type(ju.block) is type(join_units[0].block) for ju in join_units) | |||
all(isinstance(ju.block, type(join_units[0].block)) for ju in join_units) |
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 change is actually not equivalent. We have both ExtensionBlock as other Block types that are subclasses from ExtensionBlock.
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.
@jorisvandenbossche Thanks, in the first iteration of the PR, I actually retained the exact type check and opted for a # noqa
. Should this be a new issue? We could also require this behavior in a test.
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 was actually just looking at this. In the meantime it also seems that the location where this _is_uniform_join_units
is used isn't that strict anymore about the exact block types (due to #33486), so it should be fine as is.
I would personally not care about backporting style related issues. Just pinning flake8 seems easier (or letting the lint build fail ..) |
yep. not backporting this at this time. |
xref #34150
This partially addresses the above issue by:
The issue with flake8-rst is handled temporarily in #34151, and the build here will fail the flake8-rst part until that is merged in.