diff --git a/Makefile b/Makefile index 5b097459e..132cdc9bf 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,20 @@ testenv: setup ## Set up the Python test environment .PHONY: fmt fmt: setup ## Format Python code + # TODO: Use isort to sort Python imports. + # https://github.com/PyCQA/isort + # $(VENV_BIN)/isort . + # https://github.com/psf/black $(VENV_BIN)/black . + # TODO: Use blackdoc to format Python doctests. + # https://blackdoc.readthedocs.io/en/latest/ + # $(VENV_BIN)/blackdoc . + # TODO: Type checking of Python code. + # https://github.com/python/mypy + # $(VENV_BIN)/mypy dbgpt + # TODO: uUse flake8 to enforce Python style guide. + # https://flake8.pycqa.org/en/latest/ + # $(VENV_BIN)/flake8 dbgpt .PHONY: pre-commit pre-commit: fmt test ## Run formatting and unit tests before committing diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index b122a3ee5..dc49dd0aa 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -11,4 +11,6 @@ pytest-recording pytesseract==0.3.10 aioresponses # for git hooks -pre-commit \ No newline at end of file +pre-commit +# Type checking +mypy==0.991 \ No newline at end of file