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

[flake8] Enabling flake8 linting #3776

Merged
merged 1 commit into from
Nov 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .pycodestyle

This file was deleted.

2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
- TRAVIS_CACHE=$HOME/.travis_cache/
- TRAVIS_NODE_VERSION="7.10.0"
matrix:
- TOX_ENV=flake8
- TOX_ENV=javascript
- TOX_ENV=pylint
- TOX_ENV=py34-postgres
Expand All @@ -30,5 +31,6 @@ before_script:
install:
- pip install --upgrade pip
- pip install tox tox-travis
- pip install --upgrade flake8
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
script: tox -e $TOX_ENV
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,3 @@ detailed-errors=1
with-coverage=1
nocapture=1
cover-package=superset

[pycodestyle]
max-line-length=90
64 changes: 64 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,61 @@ envlist =
py35-mysql
skipsdist=True

[flake8]
application-import-names = superset
exclude =
.tox
docs
superset/assets
superset/migrations
superset/templates
ignore =
C812
E111
E114
E116
E121
E123
E125
E126
E127
E128
E131
E203
E221
E225
E226
E241
E302
E303
E305
E306
E402
E501
E722
E703
E731
E741
F401
F403
F405
F601
F811
F841
I100
I101
I201
I202
Q000
Q001
W291
W292
W293
W391
W503
import-order-style = google
max-line-length = 90

[global]
wheel_dir = {homedir}/.wheelhouse
find_links =
Expand Down Expand Up @@ -34,6 +89,15 @@ commands =
pip install -r dev-reqs.txt
{toxinidir}/run_tests.sh

[testenv:flake8]
commands =
flake8
deps =
flake8
flake8-commas
flake8-import-order
flake8-quotes

[testenv:javascript]
commands = {toxinidir}/superset/assets/js_build.sh

Expand Down