use autoflake to remove unused imports
This commit is contained in:
parent
b7a683c11d
commit
9d7d80d3a5
9 changed files with 19 additions and 20 deletions
22
scripts/lint
22
scripts/lint
|
|
@ -1,11 +1,19 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ "$1" = '--fix' ]; then
|
||||
set -x
|
||||
black .
|
||||
isort --profile black .
|
||||
else
|
||||
set -x
|
||||
black --check .
|
||||
isort --profile black --check .
|
||||
(
|
||||
set -x
|
||||
black .
|
||||
isort --profile black .
|
||||
autoflake --in-place --recursive .
|
||||
)
|
||||
exit
|
||||
fi
|
||||
|
||||
error=0
|
||||
|
||||
(set -x; black --check .) || error=$?
|
||||
(set -x; isort --profile black --check .) || error=$?
|
||||
(set -x; autoflake --check --recursive .) || error=$?
|
||||
|
||||
exit "$error"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue