code/code: remove Frame.is_true() method
Really odd one, let's just inline it.
This commit is contained in:
parent
77f3cb4baa
commit
c3864bc12b
|
@ -158,9 +158,6 @@ class Frame:
|
||||||
"""Return a 'safe' (non-recursive, one-line) string repr for 'object'."""
|
"""Return a 'safe' (non-recursive, one-line) string repr for 'object'."""
|
||||||
return saferepr(object)
|
return saferepr(object)
|
||||||
|
|
||||||
def is_true(self, object):
|
|
||||||
return object
|
|
||||||
|
|
||||||
def getargs(self, var: bool = False):
|
def getargs(self, var: bool = False):
|
||||||
"""Return a list of tuples (name, value) for all arguments.
|
"""Return a list of tuples (name, value) for all arguments.
|
||||||
|
|
||||||
|
@ -393,12 +390,10 @@ class Traceback(List[TracebackEntry]):
|
||||||
f = entry.frame
|
f = entry.frame
|
||||||
loc = f.f_locals
|
loc = f.f_locals
|
||||||
for otherloc in values:
|
for otherloc in values:
|
||||||
if f.is_true(
|
if f.eval(
|
||||||
f.eval(
|
co_equal,
|
||||||
co_equal,
|
__recursioncache_locals_1=loc,
|
||||||
__recursioncache_locals_1=loc,
|
__recursioncache_locals_2=otherloc,
|
||||||
__recursioncache_locals_2=otherloc,
|
|
||||||
)
|
|
||||||
):
|
):
|
||||||
return i
|
return i
|
||||||
values.append(entry.frame.f_locals)
|
values.append(entry.frame.f_locals)
|
||||||
|
|
Loading…
Reference in New Issue