speed up stack

This commit is contained in:
Will McGugan
2022-10-12 13:38:18 +01:00
parent 6dceb527a1
commit 713d7d921c
2 changed files with 2 additions and 2 deletions

View File

@@ -540,7 +540,7 @@ class App(Generic[ReturnType], DOMNode):
return
if not _textual_calling_frame:
_textual_calling_frame = inspect.stack()[1]
_textual_calling_frame = inspect.stack(0)[1]
try:
if len(objects) == 1 and not kwargs:

View File

@@ -39,7 +39,7 @@ class StdoutRedirector:
if not self.devtools.is_connected:
return
caller = inspect.stack()[1]
caller = inspect.stack(0)[1]
self._buffer.append(DevtoolsLog(string, caller=caller))
# By default, `print` adds a "\n" suffix which results in a buffer