mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
simplify
This commit is contained in:
@@ -75,8 +75,8 @@ class Logger:
|
||||
_log(
|
||||
self._group,
|
||||
self._verbosity,
|
||||
*args,
|
||||
_textual_calling_frame=caller,
|
||||
*args,
|
||||
**kwargs,
|
||||
)
|
||||
except LoggerError:
|
||||
|
||||
@@ -513,8 +513,8 @@ class App(Generic[ReturnType], DOMNode):
|
||||
self,
|
||||
group: LogGroup,
|
||||
verbosity: LogVerbosity,
|
||||
_textual_calling_frame: inspect.FrameInfo,
|
||||
*objects: Any,
|
||||
_textual_calling_frame: inspect.FrameInfo | None = None,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
"""Write to logs or devtools.
|
||||
@@ -539,9 +539,6 @@ class App(Generic[ReturnType], DOMNode):
|
||||
if verbosity.value > LogVerbosity.NORMAL.value and not self.devtools.verbose:
|
||||
return
|
||||
|
||||
if not _textual_calling_frame:
|
||||
_textual_calling_frame = inspect.stack(0)[1]
|
||||
|
||||
try:
|
||||
if len(objects) == 1 and not kwargs:
|
||||
self.devtools.log(
|
||||
|
||||
Reference in New Issue
Block a user