Skip to content

Commit 3188ecb

Browse files
committed
fix build with new python
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent e341ba6 commit 3188ecb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/python/qmk/math.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def compute(expr):
2323

2424

2525
def _eval(node):
26-
if isinstance(node, ast.Num): # <number>
27-
return node.n
26+
if isinstance(node, ast.Constant): # <number>
27+
return node.value
2828
elif isinstance(node, ast.BinOp): # <left> <operator> <right>
2929
return operators[type(node.op)](_eval(node.left), _eval(node.right))
3030
elif isinstance(node, ast.UnaryOp): # <operator> <operand> e.g., -1

0 commit comments

Comments
 (0)