Skip to content

STYLE: Fixing and refactoring linting #22863

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 19 commits into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1811954
Refactoring lint.sh, wrong path pandas/src corrected, and made more c…
datapythonista Sep 27, 2018
6ace7ef
fixing linting errors in pxi.in files (linting was broken)
datapythonista Sep 28, 2018
a28a612
unifying the flake8 error codes that are being ignored
datapythonista Sep 28, 2018
af76f11
Restoring flake errors C406, C408 and C409
datapythonista Sep 28, 2018
07ebcd0
Unpinning flake8, to see if linting works with the latest version
datapythonista Sep 28, 2018
34e85f0
Synchronizing flake8 config in pep8speaks
datapythonista Sep 29, 2018
adcda47
Unifying all flake8 of .py files in one command, and moving excludes …
datapythonista Sep 29, 2018
c129197
Printing flake8 version, and moving doctests and check_import to lint.sh
datapythonista Sep 29, 2018
803b217
Moving linting from py2.7 to py3.6
datapythonista Sep 29, 2018
62a8813
Moving flake8/cpplint requirements to 3.6, as this is now where the l…
datapythonista Sep 29, 2018
720f18c
Merge remote-tracking branch 'upstream/master' into lint_refactor
datapythonista Sep 29, 2018
cabe353
lint.sh renamed to code_checks.sh, and parameters now supported to ca…
datapythonista Oct 1, 2018
9a76f58
Fixing linting script name in travis
datapythonista Oct 1, 2018
f4e17ad
Merging from master
datapythonista Oct 4, 2018
56eca8f
merging from master
datapythonista Oct 9, 2018
879157f
Merge remote-tracking branch 'upstream/master' into lint_refactor
datapythonista Oct 9, 2018
0ec16fe
Adding documentation to the new linting script
datapythonista Oct 9, 2018
cd38de3
Fix linting error in the code, and added more information for when LI…
datapythonista Oct 9, 2018
8738e80
Fixing formatting in the documentation
datapythonista Oct 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .pep8speaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@
scanner:
diff_only: True # If True, errors caused by only the patch are shown

# Opened issue in pep8speaks, so we can directly use the config in setup.cfg
# (and avoid having to duplicate it here):
# https://github.com/OrkoHunter/pep8speaks/issues/95

pycodestyle:
max-line-length: 79
ignore: # Errors and warnings to ignore
ignore:
- W503, # line break before binary operator
- E402, # module level import not at top of file
- E722, # do not use bare except
- E731, # do not assign a lambda expression, use a def
- W503 # line break before binary operator
- E741, # ambiguous variable name 'l'
Copy link
Member

Choose a reason for hiding this comment

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

Hey, this seems like a good change to me! Quick question I recently actually enforced E741 in pep8speaks config, #22795. Hence this error will be flagged on any new PRs which is the behaviour we want? I was going to follow up remove any final instances of this in codebase. See #22122

Copy link
Member Author

Choose a reason for hiding this comment

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

I think for now is important to have consistency between the CI and pep8speaks, and among all the different files. I don't have a strong opinion about E741, or the errors discussed in #22122, in general I think the less exceptions we have, the better.

- C406, # Unnecessary list literal - rewrite as a dict literal.
- C408, # Unnecessary dict call - rewrite as a literal.
- C409 # Unnecessary list passed to tuple() - rewrite as a tuple literal.
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ matrix:
- language-pack-zh-hans
- dist: trusty
env:
- JOB="2.7, lint" ENV_FILE="ci/travis-27.yaml" TEST_ARGS="--skip-slow" LINT=true
- JOB="2.7" ENV_FILE="ci/travis-27.yaml" TEST_ARGS="--skip-slow"
addons:
apt:
packages:
- python-gtk2
- dist: trusty
env:
- JOB="3.6, coverage" ENV_FILE="ci/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true DOCTEST=true
- JOB="3.6, lint, coverage" ENV_FILE="ci/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true LINT=true
# In allow_failures
- dist: trusty
env:
Expand Down Expand Up @@ -115,10 +115,6 @@ script:
- ci/script_single.sh
- ci/script_multi.sh
- ci/lint.sh
- ci/doctests.sh
- echo "checking imports"
- source activate pandas && python ci/check_imports.py
- echo "script done"

after_success:
- ci/upload_coverage.sh
Expand Down
37 changes: 0 additions & 37 deletions ci/check_imports.py

This file was deleted.

60 changes: 0 additions & 60 deletions ci/doctests.sh

This file was deleted.

Loading