-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
97 lines (85 loc) · 2.07 KB
/
pyproject.toml
File metadata and controls
97 lines (85 loc) · 2.07 KB
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
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "urapi"
version = "20250224"
description = "Your API for User Registration"
license = "Proprietary"
authors = ["Thomas Touhey <thomas@touhey.fr>"]
[tool.poetry.dependencies]
python = "^3.11"
aiosmtplib = "^4.0.0"
asyncpg = "^0.30.0"
fastapi = "^0.103.1"
orjson = "^3.10.15"
pydantic = {extras = ["email"], version = "^2.10.6"}
pydantic-settings = "^2.8.0"
[tool.poetry.group.dev.dependencies]
httpx = "^0.25.0" # Used by FastAPI's test client.
pre-commit = "^3.4.0"
pytest = "^8.3.4"
pytest-asyncio = "^0.25.3"
pytest-cov = "^6.0.0"
pytest-mock = "^3.14.0"
pytest-postgresql = "^7.0.0"
[tool.poetry.group.deployment.dependencies]
gunicorn = "^21.2.0"
uvicorn = "^0.23.2"
[tool.ruff]
exclude = ["try*.py"]
fix = true
line-length = 79
target-version = "py311"
[tool.ruff.lint]
select = [
"ANN",
"ASYNC",
"B",
"COM",
"D",
"E",
"F",
"FAST",
"G",
"I",
"Q",
"RUF",
"S",
"UP",
"W",
]
ignore = [
"ANN002", # No type annotations for *args
"ANN003", # No type annotations for **kwargs
"ANN204", # No return type for special method
"ANN401", # We allow typing.Any in certain annoying cases
"D105", # No need for docstrings in magic __methods__
"D107", # No need for docstrings in __init__
"S413", # We use pycryptodome, not pycrypto
"S608", # We build our requests ourselves here.
]
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["urapi"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"tests/**.py" = ["D103", "S101", "S106"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
addopts = """
--cov=urapi --cov-report html --cov-report term --doctest-modules
--ignore=docs
"""
[tool.mypy]
ignore_missing_imports = true
mypy_path = "."
warn_unused_ignores = true
[tool.coverage.report]
exclude_lines = [
"@abstractmethod",
"@_abstractmethod",
"pragma: no cover"
]