Skip to content

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

Merged
merged 9 commits into from
Nov 1, 2017
Merged

a zillion flakes #18046

merged 9 commits into from
Nov 1, 2017

Conversation

jbrockmendel
Copy link
Member

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.

@gfyoung gfyoung added Clean Internals Related to non-user accessible pandas implementation labels Oct 31, 2017
and hasattr(other, 'closed'))
return (hasattr(other, 'left') and
hasattr(other, 'right') and
hasattr(other, 'closed'))
Copy link
Member

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)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call!

Copy link
Member

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)

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do.

@jreback jreback added Code Style Code style, linting, code_checks and removed Clean Internals Related to non-user accessible pandas implementation labels Oct 31, 2017
@jreback
Copy link
Contributor

jreback commented Oct 31, 2017

fine modulo @jorisvandenbossche comment.

@jreback
Copy link
Contributor

jreback commented Oct 31, 2017

ugh. No doubt I missed a bunch...

its pretty easy to run this locally.

@codecov
Copy link

codecov bot commented Oct 31, 2017

Codecov Report

Merging #18046 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.04% <ø> (ø) ⬆️
#single 40.24% <ø> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c65a0f5...b693180. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 31, 2017

Codecov Report

Merging #18046 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.04% <100%> (ø) ⬆️
#single 40.23% <100%> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/tseries/frequencies.py 96% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 881ee30...e49a004. Read the comment docs.

@jbrockmendel
Copy link
Member Author

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.

@jbrockmendel
Copy link
Member Author

Fixed up remaining complaints locally, with the exception of Timedelta. Didn't want to cause merge conflicts with #17937.

@jreback
Copy link
Contributor

jreback commented Oct 31, 2017

@jbrockmendel

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.

@jorisvandenbossche
Copy link
Member

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
Copy link
Contributor

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'])
Copy link
Contributor

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 """

Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

@jreback jreback left a 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.

@jreback jreback added this to the 0.22.0 milestone Oct 31, 2017
@jreback
Copy link
Contributor

jreback commented Nov 1, 2017

ok since we merged the nattype, this needs a rebase (upside is it should be good to go after) :>

ping when green.

@jreback jreback merged commit f62c85a into pandas-dev:master Nov 1, 2017
@jreback
Copy link
Contributor

jreback commented Nov 1, 2017

thanks!

1kastner pushed a commit to 1kastner/pandas that referenced this pull request Nov 5, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
@jbrockmendel jbrockmendel deleted the flakeit branch December 8, 2017 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants