Commit 8f96dc9
authored
Replace ast.NameConstant with ast.Constant and remove duplicates (#2188)
This pull request includes several changes to the
`onnxscript/converter.py` and `onnxscript/converter_test.py` files to
improve compatibility with different Python versions and simplify the
code. The most important changes include removing deprecated AST node
types and updating test cases to reflect these changes.1 parent 4633a3a commit 8f96dc9
File tree
3 files changed
+7
-26
lines changed- onnxscript
- _internal
3 files changed
+7
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 35 | + | |
| 36 | + | |
43 | 37 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 38 | + | |
49 | 39 | | |
50 | 40 | | |
51 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
435 | 432 | | |
436 | 433 | | |
437 | 434 | | |
438 | | - | |
439 | | - | |
440 | 435 | | |
441 | 436 | | |
442 | 437 | | |
443 | | - | |
444 | 438 | | |
445 | | - | |
446 | 439 | | |
447 | 440 | | |
448 | 441 | | |
| |||
578 | 571 | | |
579 | 572 | | |
580 | 573 | | |
581 | | - | |
| 574 | + | |
582 | 575 | | |
583 | | - | |
| 576 | + | |
584 | 577 | | |
585 | 578 | | |
586 | 579 | | |
| |||
629 | 622 | | |
630 | 623 | | |
631 | 624 | | |
632 | | - | |
| 625 | + | |
633 | 626 | | |
634 | 627 | | |
635 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
437 | 436 | | |
438 | 437 | | |
439 | 438 | | |
440 | | - | |
441 | | - | |
| 439 | + | |
442 | 440 | | |
443 | 441 | | |
444 | 442 | | |
| |||
0 commit comments