Commit c8c8a55
authored
Lower version guard in check_ast_node to Python 3.12 (#1355)
The version guard for deprecated AST node types (Num, Str, Bytes,
Ellipsis, NameConstant) currently activates only on Python >= 3.14,
where these types are removed. However, these types emit
DeprecationWarning on Python 3.12 and 3.13 when accessed via getattr.
Lower the guard from (3, 14) to (3, 12) to avoid triggering
DeprecationWarning on Python 3.12-3.13. The early return behavior is
identical: the node name is known-valid and is returned directly,
skipping the unnecessary getattr call.1 parent 8f2f928 commit c8c8a55
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
0 commit comments