-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
103 lines (89 loc) · 2.2 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
[tool.poetry]
name = "portfolio-backend"
version = "1.7.4"
description = ""
authors = ["Andrea Aramini, INI-MBM-BNC (EXT) <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.110.0"
uvicorn = {extras = ["standard"], version = "^0.29.0"}
mangum = "^0.17.0"
pydantic-settings = "^2.2.1"
structlog = "^24.1.0"
pydantic = {extras = ["email"], version = "^2.7.0"}
boto3 = "^1.34.84"
boto3-stubs = {extras = ["sns"], version = "^1.34.84"}
[tool.poetry.group.dev.dependencies]
pytest-asyncio = "^0.23.6"
pytest = "^8.1.1"
mypy = "^1.9.0"
pre-commit = "^3.7.0"
pytest-cov = "^5.0.0"
httpx = "^0.27.0"
aws-cdk-lib = "^2.135.0"
aws-cdk-aws-lambda-python-alpha = "^2.135.0a0"
pytest-mypy = "^0.10.3"
pytest-env = "^1.1.3"
pytest-mock = "^3.14.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
strict = true
plugins = [
"pydantic.mypy"
]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
addopts = ["--mypy", "--cov=src/app", "--cov-report=xml:coverage.xml"]
pythonpath = [
"src",
]
testpaths = [
"src",
]
env = [
]
[tool.ruff]
line-length = 120
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
]
lint.ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"B017", # should be considered evil
"C901", # too complex
"W191", # indentation contains tabs
]
[tool.ruff.lint.isort]
known-third-party = ["pydantic", "pytest", "fastapi"]
[tool.ruff.lint.pycodestyle]
max-line-length = 120
[tool.coverage.report]
exclude_also = [
"if __name__ == .__main__.:",
]