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(
|
_log(
|
||||||
self._group,
|
self._group,
|
||||||
self._verbosity,
|
self._verbosity,
|
||||||
*args,
|
|
||||||
_textual_calling_frame=caller,
|
_textual_calling_frame=caller,
|
||||||
|
*args,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
except LoggerError:
|
except LoggerError:
|
||||||
|
|||||||
@@ -513,8 +513,8 @@ class App(Generic[ReturnType], DOMNode):
|
|||||||
self,
|
self,
|
||||||
group: LogGroup,
|
group: LogGroup,
|
||||||
verbosity: LogVerbosity,
|
verbosity: LogVerbosity,
|
||||||
|
_textual_calling_frame: inspect.FrameInfo,
|
||||||
*objects: Any,
|
*objects: Any,
|
||||||
_textual_calling_frame: inspect.FrameInfo | None = None,
|
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Write to logs or devtools.
|
"""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:
|
if verbosity.value > LogVerbosity.NORMAL.value and not self.devtools.verbose:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not _textual_calling_frame:
|
|
||||||
_textual_calling_frame = inspect.stack(0)[1]
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(objects) == 1 and not kwargs:
|
if len(objects) == 1 and not kwargs:
|
||||||
self.devtools.log(
|
self.devtools.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user