10000 STYLE: Fixing and refactoring linting by datapythonista · Pull Request #22863 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

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 1 commit
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
8000
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
Prev Previous commit
Next Next commit
Unifying all flake8 of .py files in one command, and moving excludes …
…to setup.cfg
  • Loading branch information
datapythonista committed Sep 29, 2018
commit adcda478c3af1ae0edeaf09630ce2c3d6926b36a
18 changes: 1 addition & 17 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,7 @@ RET=0

# pandas/_libs/src is C code, so no need to search there.
MSG='Linting .py code' ; echo $MSG
flake8 pandas --filename=*.py --exclude pandas/_libs/src
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Linting setup.py' ; echo $MSG
flake8 setup.py
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Linting scripts' ; echo $MSG
flake8 scripts --filename=*.py
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Linting asv benchmarks' ; echo $MSG
flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/*.py
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Linting doc scripts' ; echo $MSG
flake8 doc/make.py doc/source/conf.py
flake8 .
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Linting .pyx code' ; echo $MSG
Expand Down
3 changes: 2 additions & 1 deletion ci/print_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def show_versions(as_json=False):
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-j", "--json", metavar="FILE", nargs=1,
help="Save output as JSON into file, pass in '-' to output to stdout")
help="Save output as JSON into file, "
"pass in '-' to output to stdout")

(options, args) = parser.parse_args()

Expand Down
9 changes: 8 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tag_prefix = v
parentdir_prefix = pandas-

[flake8]
max-line-length = 79
ignore =
W503, # line break before binary operator
E402, # module level import not at top of file
Expand All @@ -21,7 +22,13 @@ ignore =
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.
max-line-length = 79
exclude =
asv_bench/*.py, # TODO we should fix linting in those files instead of excluding
doc/sphinxext/*.py,
doc/build/*.py,
doc/temp/*.py,
.eggs/*.py,
versioneer.py

[yapf]
based_on_style = pep8
Expand Down
0