-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
45 lines (38 loc) · 1.14 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[tool.poetry]
authors = ["Kyo Huang <[email protected]>"]
description = "A Django project to demonstrate how to use Django Ninja"
name = "django-ninja-tutorial"
version = "0.1.0"
[tool.poetry.dependencies]
django = "^4.2"
python = "^3.12"
django-ninja = "^1.3.0"
pillow = "^10.4.0"
[tool.poetry.group.dev.dependencies]
django-stubs = "^5.0.4"
mypy = "^1.11.2"
pre-commit = "^3.8.0"
pytest = "^8.3.2"
pytest-django = "^4.9.0"
ruff = "0.6.3"
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[project]
requires-python = ">=3.12" #影響pyupgrade檢查與自動修正的版本
[tool.ruff] # https://docs.astral.sh/ruff/settings/#top-level
exclude = ["**/migrations/", "**/manage.py"] # 排除 migrations 目錄和 manage.py 檔案
line-length = 100
[tool.ruff.lint] # https://docs.astral.sh/ruff/settings/#lint
ignore = [
"E402", # module level import not at top of file
]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
]
[tool.ruff.format] # https://docs.astral.sh/ruff/settings/#format
quote-style = "single" # 引號風格,雙引號是預設值