Commit ae24f0f
authored
219 properly handle other ruff configuration files (#398)
* Rename `pyproject` -> `pyproject_toml` for clarity
* Start TOML integration abstraction
Rename `PyProject` -> `Pyproject` for consistency
* Pass the tests while offline
* Bring `set_config_value` into a dedicated TOML integration layer
* Move more functions into the TOML layer
* Move do-keys-exist check to TOML layer
* Rename pyproject_toml layer core functions
* Refactor the way Tools define pyproject.toml configuration to make it more generalized
* First draft of major refactor in the way file config is handled
* Temporarily skip failing test
* Rename id_keys -> keys
* do_keys_exist -> contains
* Update docstring
* Update docstring
* Add setitem and delitem methods to the KeyValueFileManager
* Addressing various TODOs
* Migrate tests into correct file
* Migrate tests into the correct file
* Uncomment tests
* Refactor tests for new structure
* Fix a few bugs
* Re-enable temporarily disabled ruff rules
* Add edge case tests for toml file manager
* Test the UsethisFileManager setter
* Support alternative ruff config files
* Fix bug in remove_configs logic for non-pyproject.toml files
* Test dunder methods for TestUsethisFileManager
* Add tests for various edge cases
* Remove unused method
* Fix test which doesn't test what is intended1 parent ba7f9ea commit ae24f0f
33 files changed
Lines changed: 1976 additions & 1489 deletions
File tree
- src/usethis
- _core
- _integrations
- file
- pyproject_toml
- toml
- ruff
- sonarqube
- uv
- _interface
- tests/usethis
- _core
- _integrations
- file
- pyproject_toml
- toml
- ruff
- sonarqube
- uv
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | | - | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
62 | 57 | | |
63 | 58 | | |
64 | 59 | | |
65 | | - | |
| 60 | + | |
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
69 | | - | |
| 64 | + | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
| |||
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
82 | | - | |
| 77 | + | |
83 | 78 | | |
84 | 79 | | |
85 | | - | |
| 80 | + | |
86 | 81 | | |
87 | 82 | | |
88 | 83 | | |
| |||
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
105 | | - | |
| 100 | + | |
106 | 101 | | |
107 | 102 | | |
108 | 103 | | |
| |||
123 | 118 | | |
124 | 119 | | |
125 | 120 | | |
126 | | - | |
| 121 | + | |
127 | 122 | | |
128 | 123 | | |
129 | 124 | | |
130 | | - | |
| 125 | + | |
131 | 126 | | |
132 | 127 | | |
133 | 128 | | |
| |||
206 | 201 | | |
207 | 202 | | |
208 | 203 | | |
209 | | - | |
| 204 | + | |
210 | 205 | | |
211 | 206 | | |
212 | 207 | | |
213 | | - | |
| 208 | + | |
214 | 209 | | |
215 | 210 | | |
216 | 211 | | |
| |||
236 | 231 | | |
237 | 232 | | |
238 | 233 | | |
239 | | - | |
| 234 | + | |
240 | 235 | | |
241 | | - | |
| 236 | + | |
242 | 237 | | |
243 | 238 | | |
244 | 239 | | |
| |||
256 | 251 | | |
257 | 252 | | |
258 | 253 | | |
259 | | - | |
260 | | - | |
| 254 | + | |
| 255 | + | |
261 | 256 | | |
262 | 257 | | |
263 | 258 | | |
| |||
335 | 330 | | |
336 | 331 | | |
337 | 332 | | |
338 | | - | |
339 | | - | |
340 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
341 | 336 | | |
342 | 337 | | |
343 | 338 | | |
| |||
347 | 342 | | |
348 | 343 | | |
349 | 344 | | |
350 | | - | |
| 345 | + | |
351 | 346 | | |
352 | 347 | | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
0 commit comments