diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 90a0146e1..40e2dbdef 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -79,4 +79,4 @@ jobs: run: | python -m pip install --upgrade pip pip install black - black -l 120 --exclude "(ply|nml/actions/action2var_variables.py|nml/actions/action3_callbacks.py)" --check --diff nml + black --check --diff nml diff --git a/Makefile b/Makefile index bdd34bb2d..048a75210 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ MAKE?=make PYTHON?=/usr/bin/env python3 -BLACK_OPTIONS=-l 120 --exclude 'action2var_variables.py|action3_callbacks.py|ply' .PHONY: regression test install extensions clean flake black @@ -21,8 +20,8 @@ clean: rm -f *.so flake: - $(PYTHON) -m black --check $(BLACK_OPTIONS) nml + $(PYTHON) -m black --check nml $(PYTHON) -m flake8 nml black: - $(PYTHON) -m black $(BLACK_OPTIONS) nml + $(PYTHON) -m black nml diff --git a/pyproject.toml b/pyproject.toml index 84ac37488..71b7f39d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,6 @@ [build-system] requires = ["setuptools", "ply"] + +[tool.black] +line-length = 120 +exclude = 'action2var_variables.py|action3_callbacks.py|ply|setup.py'