-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (154 loc) · 5.32 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (154 loc) · 5.32 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[project]
name = "exa-direct"
version = "0.1.0"
description = "Minimal CLI for direct Exa API usage (search, contents, find-similar, answer, research, context)."
readme = "README.md"
requires-python = ">=3.10"
authors = [{name = "exa-direct", email = "devnull@example.com"}]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"exa_py>=1.16.1,<2.0",
"httpx>=0.27,<1.0",
]
[project.urls]
Homepage = "https://exa.ai/"
Documentation = "https://docs.exa.ai/reference/getting-started"
[project.scripts]
exa = "exa_direct.cli:main"
[tool.ruff]
line-length = 88
target-version = "py314"
preview = true
# Decision Framework (§2.1, weighted score 0.90): explicit src roots keep lint/format coverage on maintained trees.
src = ["src", "tests", "examples"]
extend-include = ["tests/**/*.py", "examples/**/*.py"]
[tool.ruff.lint]
preview = true
select = [
# Core Python style and syntax
"D", # pydocstyle - docstring formatting
"E", # pycodestyle - syntax errors
"W", # pycodestyle - warnings
"F", # pyflakes - undefined names, unused imports
"I", # isort - import sorting
"UP", # pyupgrade - Python version upgrades
# Code quality and bug detection
"B", # flake8-bugbear - bug detection
"C4", # flake8-comprehensions - list/dict comprehensions
"SIM", # flake8-simplify - code simplification
"RET", # flake8-return - return statement issues
"RUF", # Ruff-specific rules
# Best practices and modernization
"PTH", # flake8-use-pathlib - pathlib usage
"PIE", # flake8-pie - miscellaneous fixes
"ERA", # eradicate - remove commented code
"PD", # pandas-vet - pandas best practices
"NPY", # NumPy-specific rules
"PERF", # perflint - performance issues
"FURB", # refurb - code modernization
# Additional rules for stricter Google styling
"A", # flake8-builtins - shadowing builtins
"BLE", # flake8-blind-except - bare except clauses
"COM", # flake8-commas - trailing commas
"FBT", # flake8-boolean-trap - boolean positional args
"ICN", # flake8-import-conventions - import naming
"ISC", # flake8-implicit-str-concat - implicit string concatenation
"Q", # flake8-quotes - quote consistency
"SLF", # flake8-self - private member access
# Logging and debugging
"LOG", # flake8-logging-format - logging format
"T10", # flake8-debugger - debugger statements
"T20", # flake8-print - print statements
# Exception handling
"TRY", # tryceratops - exception handling
]
ignore = [
"S101", # assert statements in tests
"S108", # insecure temp file usage (acceptable in tests)
"S311", # pseudo-random generators (acceptable for tests/non-crypto)
"T20", # print statements in CLI
"COM812", # trailing comma missing (formatter handles)
"COM819", # trailing comma prohibited
"TRY003", # Long messages outside exception class
"ERA001", # commented out code (too noisy)
"TRY301", # Raise to an inner function
"TRY300", # Consider moving to else (can change semantics)
"RET505", # superfluous-else-return
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"SLF001", # private-member-access
"TC001", # typing-only-first-party-import
"TC002", # typing-only-third-party-import
"TC003", # typing-only-standard-library-import
"SIM300", # yoda-conditions
"C408", # unnecessary-collection-call
"FBT001", # boolean-type-hint-positional-argument
"FBT002", # boolean-default-value-positional-argument
"FBT003", # boolean-default-value-positional-argument
]
fixable = ["ALL"]
[tool.ruff.format]
preview = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# Test files - more permissive
"tests/**/*" = [
"S101", # Allow assert statements
"ARG001", # Allow unused arguments
"F821", # Allow undefined names in test mocking contexts
]
[tool.pyright]
# Decision Framework (§2.1): mirror maintained directories so pyright type-checks src/tests/examples consistently.
include = ["src", "tests", "examples"]
pythonVersion = "3.14"
typeCheckingMode = "basic"
exclude = [
"**/.venv",
"**/site-packages",
"/home/bjorn/.local/share/uv/python/**",
]
venvPath = "."
venv = ".venv"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"
# Decision Framework (§2.1): align pylint roots with enforced quality gates for src/tests/examples.
[tool.pylint.main]
fail-under = 9.5
py-version = "3.14"
recursive = true
source-roots = ["src", "tests", "examples"]
[tool.pylint.basic]
good-names = ["id","url","q","rc"]
[tool.pylint.format]
max-line-length = 88
[tool.pylint.imports]
ignored-modules = ["requests", "exa_py", "pytest"]
[tool.pylint.messages_control]
disable = [
"too-many-branches",
"too-many-statements",
"too-many-arguments",
"unused-argument",
"too-few-public-methods",
"import-outside-toplevel",
"no-else-return",
]
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[dependency-groups]
dev = [
"pytest>=8.4.2,<9.0",
"ruff>=0.14.0,<0.15",
"pyright>=1.1.406,<1.2",
"pylint>=4.0.0,<5.0",
]