Skip to content

Commit 86c027d

Browse files
Update python.md
1 parent 1d5cf40 commit 86c027d

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

recipes/make/python.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For MyPy, see [Mypy - Add to project](../python/mypy/add-to-project.md) guide in
1919
From: [github.com/willmcgugan](https://github.com/willmcgugan/rich/)
2020

2121
- `Makefile` - I am interested in the Mypy lines here.
22-
```makefile
22+
```make
2323
test:
2424
pytest --cov-report term-missing --cov=rich tests/ -vv
2525
@@ -191,7 +191,6 @@ install-dev:
191191
pip install -r requirements-dev.txt
192192

193193

194-
195194
lint:
196195
flake8 --max-line-length 88 abc/ tests/
197196
isort -rc -c abc/ tests/
@@ -265,3 +264,24 @@ pypi: ## upload the built distributions to PyPI.
265264
testpypi: ## upload the distrubutions to PyPI's testing server.
266265
python -m twine upload --verbose --repository testpypi dist/*
267266
```
267+
268+
269+
## Quality checks and formatitng
270+
271+
Based on [promptsource](https://github.com/bigscience-workshop/promptsource/blob/main/Makefile).
272+
273+
Without config files.
274+
275+
```Makefile
276+
CHECK_DIRS = my_app
277+
LINE_LENGTH = 119
278+
279+
fmt-check:
280+
black $(CHECK_DIRS) --line-length $(LINE_LENGTH) --target-version py38 --check
281+
isort $(CHECK_DIRS) --check-only
282+
flake8 $(CHECK_DIRS) --max-line-length $(LINE_LENGTH)
283+
284+
fmt:
285+
black $(CHECK_DIRS) --line-length $(LINE_LENGTH) --target-version py38
286+
isort $(CHECK_DIRS)
287+
```

0 commit comments

Comments
 (0)