1
0
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:
Ross McFarland
2022-07-04 12:27:39 -07:00
parent 392d8b516f
commit e116d26eec
101 changed files with 6403 additions and 5490 deletions

View File

@@ -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
View 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

View File

@@ -17,5 +17,4 @@ fi
SOURCES="*.py octodns/*.py octodns/*/*.py tests/*.py"
pycodestyle --ignore=E221,E241,E251,E722,E741,W504 $SOURCES
pyflakes $SOURCES