aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Makefile7
-rw-r--r--python/pyproject.toml9
2 files changed, 13 insertions, 3 deletions
diff --git a/python/Makefile b/python/Makefile
index 4ef99f5..d6eafac 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -14,14 +14,15 @@ deps: ## Install dependencies using pipenv
.PHONY: lint
lint: ## Run lints (eg, flake8, mypy)
- #pipenv run flake8 . --exit-zero
- pipenv run flake8 . --select=E9,F63,F7,F82 --exit-zero
+ pipenv run flake8 . --exit-zero
+ pipenv run isort -q -c .
pipenv run mypy *.py sandcrawler/ tests/ --ignore-missing-imports
pipenv run pylint --rcfile=.pylintrc -E --jobs=4 sandcrawler tests/*.py *.py
.PHONY: fmt
fmt: ## Run code formating on all source code
- pipenv run black *.py sandcrawler/ tests/
+ pipenv run isort --atomic .
+ pipenv run yapf -p -i -r sandcrawler tests scripts *.py
.PHONY: test
test: ## Run all tests and lints
diff --git a/python/pyproject.toml b/python/pyproject.toml
new file mode 100644
index 0000000..f7fb3bd
--- /dev/null
+++ b/python/pyproject.toml
@@ -0,0 +1,9 @@
+[build-system]
+requires = ["setuptools", "wheel"]
+build-backend = "setuptools.build_meta:__legacy__"
+
+[tool.yapf]
+COLUMN_LIMIT = 120
+
+[tool.isort]
+line_length = 120