Add flake8 Python linting.

This commit is contained in:
Christopher Charbonneau Wells 2017-08-22 13:29:16 -04:00
parent 2789234a92
commit 410e6c9e48
4 changed files with 32 additions and 3 deletions

View File

@ -10,3 +10,4 @@ django-widget-tweaks = "*"
[dev-packages]
faker = "*"
flake8 = "*"

16
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "837c05c254d8603c80ce3add8dfd5e9a80701a742fdd1b98568f1b664586870f"
"sha256": "547b11caae0d9c3ca69111553ae252eaae921249de5f2bce48bb3eb59b61d853"
},
"requires": {},
"sources": [
@ -22,7 +22,7 @@
"version": "==1.4.1"
},
"djangorestframework": {
"version": "==3.6.3"
"version": "==3.6.4"
},
"pytz": {
"version": "==2017.2"
@ -32,6 +32,18 @@
"faker": {
"version": "==0.7.18"
},
"flake8": {
"version": "==3.4.1"
},
"mccabe": {
"version": "==0.6.1"
},
"pycodestyle": {
"version": "==2.3.1"
},
"pyflakes": {
"version": "==1.5.0"
},
"python-dateutil": {
"version": "==2.6.1"
},

View File

@ -2,11 +2,26 @@ var gulp = require('gulp');
var sassLint = require('gulp-sass-lint');
var pump = require('pump');
var spawn = require('child_process').spawn;
var watchConfig = require('../config.js').watchConfig;
gulp.task('lint', ['lint:styles']);
gulp.task('lint', ['lint:styles', 'lint:python']);
gulp.task('lint:python', function(cb) {
spawn(
'pipenv',
[
'run',
'flake8',
'--exclude=node_modules,migrations'
],
{
stdio: 'inherit'
}
).on('exit', cb);
});
gulp.task('lint:styles', function(cb) {
pump([

View File

@ -11,6 +11,7 @@
"gulp-sass": "^3.1.0",
"gulp-sass-glob": "^1.0.8",
"gulp-sass-lint": "^1.3.2",
"gulp-spawn": "^0.4.0",
"gulp-uglify": "^3.0.0",
"jquery": "^3.2.1",
"moment": "^2.18.1",