-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
108 lines (85 loc) · 2.21 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[tool.poetry]
name = "mqtt-fastapi"
version = "0.1.0"
description = ""
authors = ["Mikko Leppänen <[email protected]>"]
readme = "README.md"
#packages = [{include = "mqtt_fastapi", from = "src"}]
[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.99.1"
uvicorn = "^0.22.0"
pydantic = "==1.10.10"
loguru = "^0.7.0"
paho-mqtt = "^1.6.1"
asyncpg = "^0.27.0"
tortoise-orm = "^0.19.3"
python-dotenv = "^1.0.0"
asyncio-mqtt = "^0.16.1"
gunicorn = "^20.1.0"
aerich = "^0.7.1"
[tool.poetry.group.dev.dependencies]
pytest = "^7.3.1"
mypy = "^1.4.1"
black = "^23.3.0"
isort = "^5.12.0"
ruff = "^0.0.275"
pytest-cov = "^4.1.0"
pre-commit = "^3.3.2"
pytest-anyio = "^0.0.0"
httpx = "^0.24.1"
pytest-asyncio = "^0.21.0"
freezegun = "^1.2.2"
[tool.aerich]
tortoise_orm = "src.database.db.TORTOISE_ORM"
location = "./migrations"
src_folder = "./."
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
select = ["E", "F", "B", "W", "C4", "PIE", "RET", "SIM", "RUF", "C90", "UP", "ERA", "ARG"]
ignore = ["E501"] # line-too-long
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["E", "F", "B", "W", "C4", "PIE", "RET", "SIM", "RUF", "C90", "UP", "ERA", "ARG"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".git",
".mypy_cache",
".ruff_cache",
]
per-file-ignores = { }
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.11.
target-version = "py311"
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.flake8-bugbear]
extend-immutable-calls = ["fastapi.Depends", "fastapi.params.Depends", "fastapi.Query", "fastapi.params.Query"]
[tool.black]
line-length = 88
target-version = ['py311']
[tool.mypy]
plugins = "pydantic.mypy"
exclude = "setup.py"
# basic
python_version = "3.11"
pretty = true
show_error_codes = true
# be strict(ish)
disallow_untyped_calls = true
disallow_untyped_defs = true
check_untyped_defs = true
strict_equality = true
no_implicit_optional = true
# warnings
warn_unused_ignores = true
warn_unreachable = true
warn_redundant_casts = true
warn_unused_configs = true
[tool.isort]
profile = "black"