-
-
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
MAINT: Expand lint for *.py #14516
MAINT: Expand lint for *.py #14516
Conversation
are flake8 options not strict enough? IOW why were these not caught before? |
Current coverage is 85.26% (diff: 91.66%)@@ master #14516 diff @@
==========================================
Files 140 140
Lines 50672 50672
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 43207 43207
Misses 7465 7465
Partials 0 0
|
@jreback : TBH, I have no idea. I didn't really change anything with the command flags. But if it works, that's work counts I guess. 😄 |
@jreback : Is this good to merge since Travis is passing? |
@@ -2194,16 +2194,17 @@ def _handle_usecols(self, columns, usecols_key): | |||
usecols_key is used if there are string usecols. | |||
""" | |||
if self.usecols is not None: | |||
if any([isinstance(u, string_types) for u in self.usecols]): | |||
if any([isinstance(usecol, string_types) | |||
for usecol in self.usecols]): |
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.
is this needed to pass the tests? (I can't imagine we nowhere use i
in a iteration) as I actually find the one-liner better
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 : The u
shadows the u
import from pandas.compat
. I don't see any problem with making this expanded as usecol
.
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.
ah ok, could also use c
or col
It's not a 'problem', but IMO a multiline list comprehension or multiline if condition is always less clear than a single line one (if you are not too brief to get it on one line).
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.
That works.
feab4d0
to
e7429aa
Compare
@jorisvandenbossche : Any reason why you moved it to 0.20.0? This isn't an API change. |
It doesn't matter to merge now or not, that just indicates that it is not essential to backport |
Ah, okay. Good to know! |
@gfyoung thanks! |
Expand lint to include all Python files, excluding the directories
pandas/rpy
(deprecated and soon to be removed) andpandas/src
(C code).