Skip to content

Commit

Permalink
ast.Constant deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
avanwinkle committed Feb 3, 2025
1 parent 271b0cf commit 8b8c105
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions mpf/core/placeholder_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,7 @@ def __init__(self, machine):
"""Initialize."""
super().__init__(machine)
self._eval_methods = {
ast.Num: self._eval_num,
ast.Str: self._eval_str,
ast.NameConstant: self._eval_constant,
ast.Constant: self._eval_constant,
ast.BinOp: self._eval_bin_op,
ast.UnaryOp: self._eval_unary_op,
ast.Compare: self._eval_compare,
Expand All @@ -668,18 +666,6 @@ def _parse_template(template_str):
except SyntaxError:
raise AssertionError('Failed to parse template "{}"'.format(template_str))

@staticmethod
def _eval_num(node, variables, subscribe):
del variables
del subscribe
return node.n, []

@staticmethod
def _eval_str(node, variables, subscribe):
del variables
del subscribe
return node.s, []

@staticmethod
def _eval_constant(node, variables, subscribe):
del variables
Expand Down

0 comments on commit 8b8c105

Please sign in to comment.