Commit 7b653b3
committed
feat: Parse attribute values, parameter defaults and decorators as expressions
This commit refactors how we build expressions
(visiting AST nodes) to make it more performant
(reduced memory consumption) while handling the
different possible scenarios (future annotations
or not, trying to reparse strings or not).
Building values, defaults and decorators
as expressions allows us expression
features (full name resolution) within
the visitor. This will also allow us
to render cross-references in mkdocstrings.1 parent d7f314a commit 7b653b3
12 files changed
Lines changed: 642 additions & 471 deletions
File tree
- config
- docs
- src/griffe
- agents
- nodes
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 294 | + | |
298 | 295 | | |
299 | 296 | | |
300 | 297 | | |
| |||
328 | 325 | | |
329 | 326 | | |
330 | 327 | | |
331 | | - | |
| 328 | + | |
332 | 329 | | |
333 | 330 | | |
334 | 331 | | |
| |||
342 | 339 | | |
343 | 340 | | |
344 | 341 | | |
345 | | - | |
| 342 | + | |
346 | 343 | | |
347 | 344 | | |
348 | 345 | | |
| |||
362 | 359 | | |
363 | 360 | | |
364 | 361 | | |
365 | | - | |
| 362 | + | |
366 | 363 | | |
367 | 364 | | |
368 | 365 | | |
369 | 366 | | |
370 | 367 | | |
371 | 368 | | |
372 | 369 | | |
373 | | - | |
| 370 | + | |
374 | 371 | | |
375 | 372 | | |
376 | | - | |
| 373 | + | |
377 | 374 | | |
378 | 375 | | |
379 | 376 | | |
| |||
384 | 381 | | |
385 | 382 | | |
386 | 383 | | |
387 | | - | |
| 384 | + | |
388 | 385 | | |
389 | 386 | | |
390 | | - | |
| 387 | + | |
391 | 388 | | |
392 | 389 | | |
393 | | - | |
| 390 | + | |
394 | 391 | | |
395 | 392 | | |
396 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments