-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (98 loc) · 3.5 KB
/
Copy pathpyproject.toml
File metadata and controls
112 lines (98 loc) · 3.5 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[project]
name = "fastapi-typed-errors"
version = "1.0.1"
description = "Typed error responses for FastAPI: Literal error codes, discriminated unions in OpenAPI, single source of truth"
readme = "README.md"
authors = [
{ name = "Fedor Ratschew", email = "feodor.ra@me.com" },
]
requires-python = ">=3.12"
license = "MIT"
license-files = ["LICENSE"]
keywords = ["fastapi", "errors", "openapi", "typed", "pydantic"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: FastAPI",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet :: WWW/HTTP",
"Typing :: Typed",
]
dependencies = [
# 0.137/0.138 introduced the lazy _IncludedRouter tree but not the supported
# iter_route_contexts iterator — nested includes cannot be walked there; skip that gap.
"fastapi>=0.115,!=0.137.*,!=0.138.*",
"pydantic>=2.9",
]
[project.optional-dependencies]
cli = ["typer>=0.15"]
[project.scripts]
fastapi-typed-errors = "fastapi_typed_errors.analysis.cli:main"
[project.urls]
Homepage = "https://feodor-ra.github.io/fastapi-typed-errors/"
Documentation = "https://feodor-ra.github.io/fastapi-typed-errors/"
Repository = "https://github.com/feodor-ra/fastapi-typed-errors"
Issues = "https://github.com/feodor-ra/fastapi-typed-errors/issues"
[build-system]
requires = ["uv_build>=0.11.32,<0.12.0"]
build-backend = "uv_build"
[tool.ruff]
line-length = 120
preview = true
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"TC", # flake8-type-checking: runtime type information is the point of this package
"CPY", # flake8-copyright: no per-file copyright notices
"missing-trailing-comma", # COM812: conflicts with the formatter
"relative-imports", # TID252: relative imports inside the package are welcome
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"assert", # S101: pytest is built on assert
"implicit-namespace-package", # INP001: the tests directory is not a package
"raw-string-in-exception", # EM101: raising errors with a literal detail is the package's own user-facing pattern
"magic-value-comparison", # PLR2004: comparing to literal counts/exit codes is normal in tests
"import-private-name", # PLC2701: tests exercise the package's private internals
]
"scripts/**" = [
"assert", # S101: the packaging smoke test asserts
"implicit-namespace-package", # INP001: scripts is not a package
"raw-string-in-exception", # EM101: literal details mirror the package's own pattern
]
[tool.ty.rules]
all = "error"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-config --strict-markers"
[tool.coverage.run]
source = ["fastapi_typed_errors"]
branch = true
[tool.coverage.report]
show_missing = true
fail_under = 100
[dependency-groups]
dev = [
"anyio~=4.14.2",
# Both TestClient transports: old starlette (fastapi floor) imports httpx, new starlette imports httpx2.
"httpx~=0.28.0",
"httpx2~=2.9.1",
"pytest~=9.1.1",
"pytest-cov~=7.1.0",
"ruff==0.16.0",
"ty==0.0.63",
"typer~=0.27.0",
]
docs = [
"mkdocs-material~=9.7.7",
"mkdocs-static-i18n~=1.3.1",
"mkdocstrings[python]~=1.0.6",
]