-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
74 lines (63 loc) · 1.66 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
[tool.rye.scripts]
fmt = "rye fmt"
lint = "rye lint --fix"
check = "pyright"
test = "rye test"
all = { chain = ["fmt", "lint", "check", "test"] }
[project]
name = "postmodern"
version = "0.1.0"
description = "Add your description here"
authors = [
{ name = "Your Name", email = "[email protected]" }
]
readme = "README.md"
# If you're building a public library, you'll want to be more lenient
# with the Python versions you permit. If this is internal, then you
# should use Python 3.12
requires-python = "~= 3.12"
dependencies = [
"pydantic~=2.8.2",
]
[project.scripts]
# running `postmodern` will call this script
"postmodern" = "postmodern.cli:main"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.rye]
managed = true
dev-dependencies = [
"pytest~=8.2.2",
"pyright~=1.1.372",
]
[tool.ruff]
# if this is a library, enter the _minimum_ version you
# want to support, otherwise do py312
target-version = "py312"
line-length = 120
[tool.ruff.lint]
# you can see the looong list of rules here:
# https://docs.astral.sh/ruff/rules/
# here's a couple to start with
select = [
"A", # warn about shadowing built-ins
"E", # style stuff, whitespaces
"F", # important pyflakes lints
"I", # import sorting
"N", # naming
"T100", # breakpoints (probably don't want these in prod!)
]
# if you're feeling confident you can do:
# select = ["ALL"]
# and then manually ignore annoying ones:
# ignore = [...]
[tool.ruff.lint.isort]
# so it knows to group first-party stuff last
known-first-party = ["postmodern"]
[tool.pyright]
venvPath = "."
venv = ".venv"
strict = ["**/*.py"]
[tool.pytest.ini_options]
addopts = "--doctest-modules"