Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools.calculation: replace deprecated
ast.Num
with ast.Constant
`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.
- Loading branch information