diff options
author | jaseg <git@jaseg.de> | 2024-07-18 14:19:04 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2024-07-18 14:19:04 +0200 |
commit | 501882ea3d4fec51baa1c8711ef78786bd40de7b (patch) | |
tree | 6549a609fb57a34bd8280fad597de4ed2f3093ca | |
parent | e3a67161877023e4519749b7d0bb334394a6e444 (diff) | |
download | gerbonara-501882ea3d4fec51baa1c8711ef78786bd40de7b.tar.gz gerbonara-501882ea3d4fec51baa1c8711ef78786bd40de7b.tar.bz2 gerbonara-501882ea3d4fec51baa1c8711ef78786bd40de7b.zip |
Fix ast deprecation warnings
-rw-r--r-- | gerbonara/aperture_macros/parse.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py index 33c205e..3887d98 100644 --- a/gerbonara/aperture_macros/parse.py +++ b/gerbonara/aperture_macros/parse.py @@ -20,8 +20,8 @@ def rad_to_deg(x): return (x / math.pi) * 180 def _map_expression(node, variables={}, parameters=set()): - if isinstance(node, ast.Num): - return ConstantExpression(node.n) + if isinstance(node, ast.Constant): + return ConstantExpression(node.value) elif isinstance(node, ast.BinOp): op_map = {ast.Add: operator.add, ast.Sub: operator.sub, ast.Mult: operator.mul, ast.Div: operator.truediv} |