mirror of https://github.com/snachodog/mybuddy.git
Use black for linting and formatting
This commit is contained in:
parent
cd946280cb
commit
ae7f9d5043
1
Pipfile
1
Pipfile
|
@ -25,7 +25,6 @@ whitenoise = "*"
|
||||||
|
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
coveralls = "*"
|
coveralls = "*"
|
||||||
flake8 = "*"
|
|
||||||
ipaddress = "*"
|
ipaddress = "*"
|
||||||
mkdocs = "*"
|
mkdocs = "*"
|
||||||
mkdocs-material = "*"
|
mkdocs-material = "*"
|
||||||
|
|
13
gulpfile.js
13
gulpfile.js
|
@ -145,13 +145,22 @@ function extras(cb) {
|
||||||
], cb);
|
], cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs Black formatting on Python code.
|
||||||
|
*
|
||||||
|
* @param cb
|
||||||
|
*/
|
||||||
|
function format(cb) {
|
||||||
|
_runInPipenv(['black', '.'], cb);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs linting on Python and SASS code.
|
* Runs linting on Python and SASS code.
|
||||||
*
|
*
|
||||||
* @param cb
|
* @param cb
|
||||||
*/
|
*/
|
||||||
function lint(cb) {
|
function lint(cb) {
|
||||||
_runInPipenv(['flake8', '--exclude=.venv,etc,migrations,manage.py,node_modules,settings'], cb);
|
_runInPipenv(['black', '.', '--check', '--diff', '--color'], cb);
|
||||||
|
|
||||||
pump([
|
pump([
|
||||||
gulp.src(config.watchConfig.stylesGlob),
|
gulp.src(config.watchConfig.stylesGlob),
|
||||||
|
@ -366,6 +375,8 @@ gulp.task('docs:watch', docsWatch);
|
||||||
|
|
||||||
gulp.task('extras', extras);
|
gulp.task('extras', extras);
|
||||||
|
|
||||||
|
gulp.task('format', format);
|
||||||
|
|
||||||
gulp.task('lint', lint);
|
gulp.task('lint', lint);
|
||||||
|
|
||||||
gulp.task('scripts', scripts);
|
gulp.task('scripts', scripts);
|
||||||
|
|
Loading…
Reference in New Issue