Skip to content
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

STYLE: Fixing #18419 - Fixing flake8 issues to allow for >3.4.1 support #22625

Closed
wants to merge 8 commits into from

Conversation

AaronCritchley
Copy link
Contributor

There were tons of E722's, in a lot of cases I did not know what exceptions the author was expecting, so have unfortunately had to mark as except Exception, but where possible, have been more specific. If the reviewer/s know the expected exceptions then happy to adjust.

Tested on flake8 3.5, log below:

(pandas-dev) ajc:pandas aaron$ ci/lint.sh 
inside ci/lint.sh
Linting *.py
Linting *.py DONE
Linting setup.py
Linting setup.py DONE
Linting asv_bench/benchmarks/
Linting asv_bench/benchmarks/*.py DONE
Linting scripts/*.py
Linting scripts/*.py DONE
Linting doc scripts
Linting doc scripts DONE
Linting *.pyx
Linting *.pyx DONE
Linting *.pxi.in
linting -> pandas/src
Linting *.pxi.in DONE
Linting *.pxd
linting -> pandas/_libs
Linting *.pxd DONE
Linting *.c and *.h
linting -> pandas/_libs/src/*.h
ci/lint.sh: line 101: cpplint: command not found
linting -> pandas/_libs/src/parser
ci/lint.sh: line 101: cpplint: command not found
linting -> pandas/_libs/src/ujson
ci/lint.sh: line 101: cpplint: command not found
linting -> pandas/_libs/tslibs/src/datetime
ci/lint.sh: line 107: cpplint: command not found
Linting *.c and *.h DONE
Check for invalid testing
Check for invalid testing DONE
Check for non-standard imports
Check for non-standard imports DONE
Check for incorrect sphinx directives
Check for incorrect sphinx directives DONE
Check for deprecated messages without sphinx directive
Check for deprecated messages without sphinx directive DONE
Check for old-style classes
Check for old-style classes DONE
Check for backticks incorrectly rendering because of missing spaces
Check for backticks incorrectly rendering because of missing spaces DONE
(pandas-dev) ajc:pandas aaron$ flake8 --version
3.5.0 (flake8-comprehensions: 1.4.1, mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 3.6.5 on Darwin

@pep8speaks
Copy link

Hello @AaronCritchley! Thanks for submitting the PR.

@jreback
Copy link
Contributor

jreback commented Sep 7, 2018

we don’t want to simply mark Exception otherwise these will be overly broad

it is tedious but the way to do this is to comment the try/except and add back until the tests pass

most of these should be Type orr Value Errors or both

prob best to break this PR up a bit

after everything is done then can be more strict in the linter

@AaronCritchley
Copy link
Contributor Author

Sure, no worries, will close and try to find time to do this in smaller chunks with proper exception catches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STYLE: support flake8>3.4.1
3 participants