Commit bac08f9
committed
tools.calculation: replace deprecated
`ast.Num` and friends have been deprecated since Python 3.8, but only
started to generate warnings in the prereleases of Python 3.12.
Feels like stdlib made a bad trade here, simplifying Python internals
in exchange for users writing uglier, more complicated type checks such
as this one. But it's been so long, it's not as if they'll un-deprecate
the older, more-convenient-for-the-user classes.ast.Num with ast.Constant
1 parent d58d6a7 commit bac08f9
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | | - | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
0 commit comments