From 19f968cb92d575de3ca72042ec0531ce38cf337f Mon Sep 17 00:00:00 2001 From: leesm Date: Fri, 4 Dec 2020 20:08:39 -0800 Subject: [PATCH] add comment and adjust striatation spacing --- pysnooper/variables.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pysnooper/variables.py b/pysnooper/variables.py index 2229c38..8361154 100644 --- a/pysnooper/variables.py +++ b/pysnooper/variables.py @@ -5,11 +5,11 @@ try: except ImportError: from collections import Mapping, Sequence from copy import deepcopy - from . import utils from . import pycompat +# Check whether code needs parentheses or not. If parentheses are needed, return true def needs_parentheses(source): def code(s): return compile(s, '', 'eval').co_code @@ -32,6 +32,7 @@ class BaseVariable(pycompat.ABC): main_value = eval(self.code, frame.f_globals or {}, frame.f_locals) except Exception: return () + return self._items(main_value, normalize) @abc.abstractmethod