Add Black to python build

This commit is contained in:
Liam Newman 2020-07-07 17:16:39 -07:00
parent 3c24d784d6
commit 13e88c0c19
3 changed files with 4 additions and 3 deletions

1
.pylintrc Normal file
View File

@ -0,0 +1 @@
max-line-length=88

View File

@ -30,6 +30,7 @@ js: generate-tests js/lib/*.js
py: generate-tests $(BUILD_DIR)/python py: generate-tests $(BUILD_DIR)/python
@echo Testing python beautify functionality... @echo Testing python beautify functionality...
$(SCRIPT_DIR)/python-dev black --config=python/pyproject.toml python
$(SCRIPT_DIR)/python-dev python python/js-beautify-test.py || exit 1 $(SCRIPT_DIR)/python-dev python python/js-beautify-test.py || exit 1
jstest: depends js build/*.tgz jstest: depends js build/*.tgz
@ -129,6 +130,7 @@ $(BUILD_DIR)/virtualenv: | $(BUILD_DIR)
virtualenv --version || pip install virtualenv virtualenv --version || pip install virtualenv
virtualenv build/python-dev virtualenv build/python-dev
virtualenv build/python-rel virtualenv build/python-rel
$(SCRIPT_DIR)/python-dev pip install black
@touch $(BUILD_DIR)/virtualenv @touch $(BUILD_DIR)/virtualenv

View File

@ -1,7 +1,5 @@
[tool.black] [tool.black]
line-length = 88 target-version = ['py27', 'py36', 'py37', 'py38']
target-version = ['py36', 'py37', 'py38']
include = '\.pyi?$'
exclude = ''' exclude = '''
/( /(
\.eggs \.eggs