From c26eecaea29fc5f36d37236121b231cd597b66ab Mon Sep 17 00:00:00 2001 From: Tom Dong Date: Fri, 23 Aug 2019 00:58:11 -0700 Subject: [PATCH] Reformat Python code with black, and make it part of the build pipeline --- .ci/azure-python-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.ci/azure-python-build.yml b/.ci/azure-python-build.yml index 1fc957d..434ba3e 100644 --- a/.ci/azure-python-build.yml +++ b/.ci/azure-python-build.yml @@ -76,6 +76,13 @@ steps: "$PYBIN" -m pip install --user wheel twine setuptools milksnake displayName: 'Install dev dependencies' + - bash: | + PYBIN=`echo "$(pybin)" | tr -d "'"` + "$PYBIN" -m pip install --user black + "$PYBIN" -m black --check -t py35 ./ + displayName: 'Check Python code format' + condition: ne(variables['python.version'], '3.5') + - bash: | PYBIN=`echo "$(pybin)" | tr -d "'"` "$PYBIN" setup.py sdist