Add diff output to black workflow step (#1975)

This change adds the --diff flag when running Black. This will make it print out what it would expect to see. This makes it easier for developers to understand what they need to change for Black to be happy.

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
This commit is contained in:
Sam Kerr
2022-06-22 03:59:01 -04:00
committed by GitHub
parent 14c599e4ec
commit cb66db14b0

View File

@@ -31,7 +31,7 @@ jobs:
- run: pip install bandit black codespell flake8 mypy pyupgrade safety pylint==2.13.9
- run: pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six
- run: bandit -x ./tests -r . || true
- run: black --check .
- run: black --diff --check .
- run: codespell --ignore-words-list=zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,vie,hel --quiet-level=2 --skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,./build/pyinstaller
- run: flake8 . --count --ignore=E203,W503 --max-line-length=122 --show-source --statistics --exclude ./build/pyinstaller
- run: mypy --ignore-missing-imports --exclude="/setup\.py$" .