-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
111 lines (99 loc) · 2.7 KB
/
pyproject.toml
File metadata and controls
111 lines (99 loc) · 2.7 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "cragents"
description = "Limit reasoning output."
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pydantic-ai>=1.25.1",
]
[tool.setuptools.packages.find]
include = ["cragents*"]
[tool.setuptools.dynamic]
version = { attr = "cragents._version.__version__" }
[dependency-groups]
dev = [
"anyio>=4.12.1",
"coverage>=7.13.2",
"inline-snapshot>=0.31.1",
"pre-commit>=4.5.1",
"pyright>=1.1.408",
"pytest>=9.0.2",
"pytest-xdist>=3.8.0",
"trio>=0.32.0",
]
lint = [
"pyright>=1.1.406",
"ruff>=0.14.1",
]
[tool.ruff]
line-length = 120
target-version = "py312"
include = [
"cragents/**/*.py",
"tests/**/*.py",
]
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,*.svg,*.lock,*.css,*.yaml'
check-hidden = true
# Ignore "formatting" like **L**anguage
ignore-regex = '\*\*[A-Z]\*\*[a-z]+\b'
ignore-words-list = 'asend,aci,isTall'
[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "strict"
reportMissingTypeStubs = false
reportUnnecessaryIsInstance = false
reportUnnecessaryTypeIgnoreComment = true
reportMissingModuleSource = false
include = [
"cragents",
]
venvPath = '.'
venv = ".venv"
[tool.coverage.run]
patch = ["subprocess"]
concurrency = ["multiprocessing", "thread"]
# We use a subdirectory for coverage data to avoid noisy coverage data files.
data_file = ".coverage/.coverage"
# required to avoid warnings about files created by create_module fixture
include = [
"cragents/**/*.py",
"tests/**/*.py",
]
branch = true
# Disable include-ignored warnings as --source is enabled automatically causing a self conflict as per:
# https://github.com/pytest-dev/pytest-cov/issues/532
# https://github.com/pytest-dev/pytest-cov/issues/369
# This prevents coverage being generated by pytest-cov which has direct editor support in VS Code,
# making it super useful to check coverage while writing tests.
disable_warnings = ["include-ignored"]
[tool.ruff.lint]
extend-select = [
"Q",
"RUF100",
"RUF018", # https://docs.astral.sh/ruff/rules/assignment-in-assert/
"C90",
"UP",
"I",
"D",
"TID251",
]
mccabe = { max-complexity = 15 }
ignore = [
"D100", # ignore missing docstring in module
"D102", # ignore missing docstring in public method
"D104", # ignore missing docstring in public package
"D105", # ignore missing docstring in magic methods
"D107", # ignore missing docstring in __init__ methods
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pytest.ini_options]
testpaths = ["tests"]