mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
speed up stack
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user