Add make stylediff command and run it in tox (#3535)

* Update Makefile

* Update make.bat

* Update tox.ini
This commit is contained in:
jack1142 2020-02-14 15:09:52 +01:00 committed by GitHub
parent 066bf516d9
commit 9e1f358f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,8 @@ reformat:
$(PYTHON) -m black `git ls-files "*.py"` $(PYTHON) -m black `git ls-files "*.py"`
stylecheck: stylecheck:
$(PYTHON) -m black --check `git ls-files "*.py"` $(PYTHON) -m black --check `git ls-files "*.py"`
stylediff:
$(PYTHON) -m black --check --diff `git ls-files "*.py"`
# Translations # Translations
gettext: gettext:

View File

@ -21,6 +21,10 @@ exit /B %ERRORLEVEL%
black --check !PYFILES! black --check !PYFILES!
exit /B %ERRORLEVEL% exit /B %ERRORLEVEL%
:stylediff
black --check --diff !PYFILES!
exit /B %ERRORLEVEL%
:newenv :newenv
py -3.8 -m venv --clear .venv py -3.8 -m venv --clear .venv
.\.venv\Scripts\python -m pip install -U pip setuptools .\.venv\Scripts\python -m pip install -U pip setuptools

View File

@ -65,4 +65,4 @@ setenv =
basepython = python3.8 basepython = python3.8
extras = style extras = style
commands = commands =
make stylecheck make stylediff