-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
135 lines (123 loc) · 2.82 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[project]
name = "light-types"
version = "1.2.2"
description = "Parse, don't validate"
authors = [
{ name = "likeinlife", email = "[email protected]" }
]
dependencies = [
"pydantic>=2.8.2",
]
readme = "README.md"
requires-python = ">= 3.11"
license = "MIT"
keywords = ["phantom types", "value object"]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.urls]
Homepage = "https://pypi.org/project/light-types/"
Repository = "https://github.com/likeinlife/light-types/"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = [
"ruff>=0.5.5",
"mypy>=1.11.0",
"pre-commit>=3.7.1",
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/light_types", "src/_bool_query"]
[tool.ruff]
line-length = 120
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Allow boolean type in func arguments
"FBT001",
# Allow PEP585 annotations like dict[str, str]
"FA102",
# No blankline before class
"D203",
# Multiline string summary should start at the first line
"D213",
# Allow no-typehints
"ANN101",
"ANN102",
# Disable doc-string rules
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"D407",
"D406",
# Allow type: ignore
"PGH003",
# Useless
"FBT",
"FIX",
"TD003",
"FA100",
"B904",
"ANN401",
"SLOT000",
]
exclude = []
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Depends",
"faststream.Depends",
"fastapi.params.Depends",
"fastapi.Query",
"fastapi.params.Query",
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D", "S", "ANN", "PLR"]
[tool.mypy]
ignore_missing_imports = true
follow_imports = "normal"
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
omit = [
# omit anything in a .local directory anywhere
"*/.local/*",
"__init__.py",
"*/tests/*",
# omit anything in a .venv directory anywhere
".venv/*",
"*/containers/*",
"*/migrations/*",
"*/core/*",
]