Commit 6d919aa
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 c2ad390 commit 6d919aa
File tree
53 files changed
+1657
-1393
lines changed- src
- gitingest
- schemas
- utils
- server
- routers
- tests
- query_parser
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+1657
-1393
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 41 | | |
47 | 42 | | |
48 | 43 | | |
| |||
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
82 | | - | |
83 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
11 | 25 | | |
12 | 26 | | |
13 | 27 | | |
14 | 28 | | |
15 | 29 | | |
| 30 | + | |
16 | 31 | | |
17 | 32 | | |
18 | | - | |
| 33 | + | |
19 | 34 | | |
20 | 35 | | |
21 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
62 | 61 | | |
63 | 62 | | |
64 | 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 | + | |
65 | 92 | | |
66 | 93 | | |
67 | 94 | | |
| 95 | + | |
68 | 96 | | |
69 | 97 | | |
70 | 98 | | |
71 | 99 | | |
72 | | - | |
| 100 | + | |
73 | 101 | | |
74 | 102 | | |
75 | 103 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 104 | | |
80 | 105 | | |
81 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
0 commit comments