Skip to content

Commit

Permalink
Auto-update black before doing formatting&style chcek
Browse files Browse the repository at this point in the history
  • Loading branch information
touilleMan committed May 1, 2018
1 parent 18eda02 commit e6cd482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ env.PythonCommand(
targets=venv_dir,
sources=None,
pre_init="${PYTHON} -m virtualenv ${TARGET}",
command='${PYTHON} -m pip install "pycparser>=2.18" "cffi>=1.11.2" black',
command='${PYTHON} -m pip install "pycparser>=2.18" "cffi>=1.11.2"',
)


Expand Down Expand Up @@ -354,7 +354,7 @@ env.AlwaysBuild("release")
### Auto-format codebase ###


black_cmd = "black pythonscript tools/*.py tests/*/*.py SConstruct platforms/*/SCsub"
black_cmd = "pip install -U black && black pythonscript tools/*.py tests/*/*.py SConstruct platforms/*/SCsub"
autoformat = env.PythonCommand("autoformat", [venv_dir], black_cmd)
env.Alias("black", autoformat)
env.PythonCommand("checkstyle", [venv_dir], black_cmd + " --check")

0 comments on commit e6cd482

Please sign in to comment.