mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Implement black formatting
This commit is contained in:
@@ -24,6 +24,8 @@ echo "## begin #################################################################
|
||||
# For now it's just lint...
|
||||
echo "## lint ########################################################################"
|
||||
script/lint
|
||||
echo "## formatting ##################################################################"
|
||||
script/format --check || (echo "Formatting check failed, run ./script/format" && exit 1)
|
||||
echo "## tests/coverage ##############################################################"
|
||||
script/coverage
|
||||
echo "## complete ####################################################################"
|
||||
|
||||
9
script/format
Executable file
9
script/format
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
SOURCES=$(find *.py octodns tests -name "*.py")
|
||||
|
||||
. env/bin/activate
|
||||
|
||||
black --line-length=80 --skip-string-normalization --skip-magic-trailing-comma "$@" $SOURCES
|
||||
@@ -17,5 +17,4 @@ fi
|
||||
|
||||
SOURCES="*.py octodns/*.py octodns/*/*.py tests/*.py"
|
||||
|
||||
pycodestyle --ignore=E221,E241,E251,E722,E741,W504 $SOURCES
|
||||
pyflakes $SOURCES
|
||||
|
||||
Reference in New Issue
Block a user