Skip to content

Commit 653ad56

Browse files
authored
ci: Rename make black* to make format* (#2970)
1 parent 9c8fa6f commit 653ad56

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

DEVELOPMENT_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ eval "$(pyenv virtualenv-init -)"
5959
We format our code using [Black](https://github.com/python/black) and verify the source code is black compliant
6060
during PR checks. Black will be installed automatically with `make init`.
6161

62-
After installing, you can run our formatting through our Makefile by `make black` or integrating Black directly in your favorite IDE (instructions
62+
After installing, you can run our formatting through our Makefile by `make format` or integrating Black directly in your favorite IDE (instructions
6363
can be found [here](https://black.readthedocs.io/en/stable/editor_integration.html))
6464

6565
##### (Workaround) Integrating Black directly in your favorite IDE

Makefile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@ test-cov-report:
1717
integ-test:
1818
pytest --no-cov integration/
1919

20-
black:
20+
format:
2121
black setup.py samtranslator tests integration bin schema_source
2222
bin/transform-test-error-json-format.py --write tests/translator/output/error_*.json
2323
bin/json-format.py --write tests integration samtranslator/policy_templates_data
2424
bin/yaml-format.py --write tests
2525
bin/yaml-format.py --write integration --add-test-metadata
2626

27-
black-check:
27+
black:
28+
$(warning `make black` is deprecated, please use `make format`)
29+
# sleep for 5 seconds so the message can be seen.
30+
sleep 5
31+
make format
32+
33+
format-check:
2834
# Checking latest schema was generated (run `make schema` if this fails)
2935
mkdir -p .tmp
3036
python -m samtranslator.internal.schema_source.schema --sam-schema .tmp/sam.schema.json --cfn-schema schema_source/cloudformation.schema.json --unified-schema .tmp/schema.json
@@ -36,6 +42,12 @@ black-check:
3642
bin/yaml-format.py --check tests
3743
bin/yaml-format.py --check integration --add-test-metadata
3844

45+
black-check:
46+
$(warning `make black-check` is deprecated, please use `make format-check`)
47+
# sleep for 5 seconds so the message can be seen.
48+
sleep 5
49+
make format-check
50+
3951
lint:
4052
ruff samtranslator bin schema_source integration tests
4153
# mypy performs type check
@@ -78,7 +90,7 @@ schema-all: fetch-schema-data update-schema-data schema
7890
dev: test
7991

8092
# Verifications to run before sending a pull request
81-
pr: black-check lint init dev
93+
pr: format-check lint init dev
8294

8395
clean:
8496
rm -rf .tmp

0 commit comments

Comments
 (0)