summaryrefslogtreecommitdiff
path: root/gerbonara
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2024-07-18 14:19:04 +0200
committerjaseg <git@jaseg.de>2024-07-18 14:19:04 +0200
commit501882ea3d4fec51baa1c8711ef78786bd40de7b (patch)
tree6549a609fb57a34bd8280fad597de4ed2f3093ca /gerbonara
parente3a67161877023e4519749b7d0bb334394a6e444 (diff)
downloadgerbonara-501882ea3d4fec51baa1c8711ef78786bd40de7b.tar.gz
gerbonara-501882ea3d4fec51baa1c8711ef78786bd40de7b.tar.bz2
gerbonara-501882ea3d4fec51baa1c8711ef78786bd40de7b.zip
Fix ast deprecation warnings
Diffstat (limited to 'gerbonara')
-rw-r--r--gerbonara/aperture_macros/parse.py4
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}