add pyproject.toml

This commit is contained in:
rmanach 2023-09-21 15:04:05 +02:00
parent e3845dbc8f
commit b9e87bd0ad
4 changed files with 22 additions and 9 deletions

View File

@ -1,12 +1,8 @@
# TODO(rmanach): add a pyproject.toml
format: format:
black deployment/*.py @black mumui/*.py deployment/*.py
black mumui/*.py
lint: lint:
ruff deployment/*.py @ruff .
ruff mumui/*.py
dev: dev:
rm -rf venv rm -rf venv
@ -14,7 +10,7 @@ dev:
./venv/bin/pip install -r requirements.txt ./venv/bin/pip install -r requirements.txt
./venv/bin/pip install -r requirements-dev.txt ./venv/bin/pip install -r requirements-dev.txt
django: django: format lint
docker build . -t mumui:local docker build . -t mumui:local
pushpin-local: pushpin-local:

View File

@ -1,5 +1,4 @@
from enum import Enum from enum import Enum
from datetime import datetime
from django.contrib.auth.models import User from django.contrib.auth.models import User

18
pyproject.toml Normal file
View File

@ -0,0 +1,18 @@
[tool.black]
line-length = 88
[tool.ruff]
select = ["E", "F"]
ignore = []
exclude = [
".git",
".ruff_cache",
"venv",
"settings.py"
]
line-length = 88
target-version = "py310"
[tool.ruff.mccabe]
max-complexity = 10