-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
a zillion flakes #18046
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
a zillion flakes #18046
Conversation
pandas/_libs/interval.pyx
Outdated
and hasattr(other, 'closed')) | ||
return (hasattr(other, 'left') and | ||
hasattr(other, 'right') and | ||
hasattr(other, 'closed')) |
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.
Can we keep the original code and add this to the ignored ones (it's error code W503)?
I much prefer having the 'and' on the new line, and the most recent PEP8 agrees with me (https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator)
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.
Good call!
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 for adding it to the ignore list.
Can you undo the changes above? (and there are some below 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.
Will do.
fine modulo @jorisvandenbossche comment. |
its pretty easy to run this locally. |
Codecov Report
@@ Coverage Diff @@
## master #18046 +/- ##
==========================================
- Coverage 91.24% 91.23% -0.02%
==========================================
Files 163 163
Lines 50114 50114
==========================================
- Hits 45729 45720 -9
- Misses 4385 4394 +9
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18046 +/- ##
==========================================
- Coverage 91.25% 91.23% -0.02%
==========================================
Files 163 163
Lines 50115 50115
==========================================
- Hits 45730 45721 -9
- Misses 4385 4394 +9
Continue to review full report at Codecov.
|
We may need to re-think this strategy if we can't close this quickly. This touches so many things that it's going to need to be rebased a ton. |
Fixed up remaining complaints locally, with the exception of Timedelta. Didn't want to cause merge conflicts with #17937. |
The simplest method is to add 2 sections in lint.sh, one with the 'fixed' ones and one with the todo. you leave the todo with the existing flake checks, and gradually add files to the fixed. The you can change 1 file at a time (or a small number). we did this for the entire code base; if you do it piece by piece its easy. |
In principle this can be merged quickly, as you prefer (I think it are mainly your PRs that will have merge conflicts) |
ci/lint.sh
Outdated
if [ $? -ne "0" ]; then | ||
RET=1 | ||
fi | ||
echo "Linting *.py DONE" | ||
|
||
echo "Linting setup.py" | ||
flake8 setup.py | ||
flake8 setup.py --ignore=W503 |
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.
you can just add the global ignores to setup.cfg
|
||
class DateParseError(ValueError): | ||
pass | ||
|
||
|
||
_nat_strings = set(['NaT', 'nat', 'NAT', 'nan', 'NaN', 'NAN']) |
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.
add to list to incorporate from nattype
@@ -1,17 +1,17 @@ | |||
""" test feather-format compat """ | |||
|
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.
was this not being linted before?
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.
Just looked at config.cfg. The flake complaint being fixed here is E402 (module-level import not at top of module), which is one of two specifically ignored in setup.cfg. Woops. Just moved the ignore spec from lint.sh to cfg, will stop messing with this until further notice.
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.
ok, pls don't add anything else.
ok since we merged the nattype, this needs a rebase (upside is it should be good to go after) :> ping when green. |
thanks! |
ugh. No doubt I missed a bunch...
There are a handful of things, especially in parsers.pyx where "comments" look like commented-out code that should be either deleted or otherwise handled. I'm declaring that SEP.