Commit 110e6aa
committed
chore: migrate to Ruff, deprecate .gitingest, and general code-quality sweep
* Pre-commit
• Drop `black` + `darglint` hooks
• Add `ruff-check` & `ruff-format` (astral-sh/ruff-pre-commit)
• Swap `darglint` → `pydoclint` for doc-string lint/validation
* Dependencies
• Remove `tomli`
• Tighten `typing_extensions` pin; add `eval-type-backport`
• `requirements-dev`: drop `black`, `djlint`, `pylint` (only used inside pre-commit virtualenv)
* Ignore handling
• Deprecate `.gitingest` (TOML) → new `.gitingestignore` with git-wildmatch syntax
• Delete `apply_gitingest_file`; reuse `_parse_ignore_file` shared with `.gitignore`
* Tooling / config
• New `[tool.ruff]` section in `pyproject.toml`
• Remove `[tool.black]`
* README
• Refresh badges (PyPI, CI, Ruff, Discord, Trendshift)
* Codebase refactor
• Enable `from __future__ import annotations`; add rich type hints throughout
• Re-order function parameters and `__all__` exports for consistency
• Move type-only imports under `if TYPE_CHECKING`
• Extract CLI args to `TypedDict` `_CLIArgs`; form data to pydantic `QueryForm`
• Deduplicate `cli.main` / `_async_main`
• Split large blocks into helpers
• Remove magic numbers → constants
• Use `pathlib` over `os`; avoid `try/except` inside loops; no file-IO in async paths
• Enforce kw-only args
• Minor Ruff-driven clean-ups
* Bug fix
• Remove silent logic bug in `notebook_utils._process_cell`
* Tests
• Update fixtures & assertions
No functional API changes except the `.gitingestignore` addition & `.gitingest` deprecation.1 parent 29dbf0a commit 110e6aa
File tree
3 files changed
+88
-53
lines changed- src/gitingest
- utils
- tests
3 files changed
+88
-53
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 67 | + | |
| 68 | + | |
76 | 69 | | |
77 | 70 | | |
78 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
| 107 | + | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
| |||
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
166 | 162 | | |
167 | | - | |
168 | | - | |
| 163 | + | |
| 164 | + | |
169 | 165 | | |
170 | | - | |
171 | | - | |
172 | 166 | | |
173 | 167 | | |
174 | 168 | | |
| |||
203 | 197 | | |
204 | 198 | | |
205 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
206 | 233 | | |
207 | 234 | | |
208 | 235 | | |
| |||
223 | 250 | | |
224 | 251 | | |
225 | 252 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 253 | + | |
| 254 | + | |
234 | 255 | | |
235 | 256 | | |
236 | 257 | | |
| |||
266 | 287 | | |
267 | 288 | | |
268 | 289 | | |
269 | | - | |
| 290 | + | |
270 | 291 | | |
271 | 292 | | |
272 | 293 | | |
273 | 294 | | |
274 | 295 | | |
275 | | - | |
| 296 | + | |
276 | 297 | | |
277 | 298 | | |
278 | 299 | | |
279 | 300 | | |
280 | 301 | | |
281 | 302 | | |
282 | | - | |
| 303 | + | |
283 | 304 | | |
284 | | - | |
| 305 | + | |
285 | 306 | | |
286 | 307 | | |
287 | 308 | | |
288 | 309 | | |
289 | 310 | | |
290 | 311 | | |
291 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
292 | 325 | | |
293 | | - | |
294 | | - | |
295 | 326 | | |
296 | 327 | | |
297 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
| 207 | + | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
| |||
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
269 | | - | |
| 275 | + | |
270 | 276 | | |
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
274 | 280 | | |
275 | 281 | | |
276 | 282 | | |
277 | | - | |
278 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
279 | 290 | | |
280 | 291 | | |
281 | 292 | | |
| |||
0 commit comments