Skip to content

Commit c689221

Browse files
committed
rename to avoid hook rook rule complaint
1 parent 760c479 commit c689221

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/idom/testing.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,18 @@ def _raise_log_message_error(
281281

282282

283283
@contextmanager
284-
def capture_idom_logs(use_existing: bool = False) -> Iterator[list[logging.LogRecord]]:
284+
def capture_idom_logs(
285+
yield_existing: bool = False,
286+
) -> Iterator[list[logging.LogRecord]]:
285287
"""Capture logs from IDOM
286288
287289
Parameters:
288-
use_existing:
290+
yield_existing:
289291
If already inside an existing capture context yield the same list of logs.
290292
This is useful if you need to mutate the list of logs to affect behavior in
291293
the outer context.
292294
"""
293-
if use_existing:
295+
if yield_existing:
294296
for handler in reversed(ROOT_LOGGER.handlers):
295297
if isinstance(handler, _LogRecordCaptor):
296298
yield handler.records

0 commit comments

Comments
 (0)