From 5fdbe8afd37276ff2393ec3a3990d1dc1805d647 Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Tue, 23 Nov 2021 08:42:53 +0100 Subject: [PATCH] Reverted "ast.literal_eval(handler._low)" back to "eval(handler._low)" since handler._low is of CodeType. --- traitsui/editors/range_editor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/traitsui/editors/range_editor.py b/traitsui/editors/range_editor.py index 5677067461..d9fd6621ad 100644 --- a/traitsui/editors/range_editor.py +++ b/traitsui/editors/range_editor.py @@ -122,13 +122,13 @@ def init(self, handler=None): if self.low_name == "": if isinstance(handler._low, CodeType): - self.low = ast.literal_eval(handler._low) + self.low = eval(handler._low) else: self.low = handler._low if self.high_name == "": if isinstance(handler._low, CodeType): - self.high = ast.literal_eval(handler._high) + self.high = eval(handler._high) else: self.high = handler._high