From 22567594ebd23fd09d8556c5329fad4a77b3a9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20P=C5=99evr=C3=A1til?= Date: Fri, 8 Sep 2023 18:05:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Workaround=20for=20`lazy-import`?= =?UTF-8?q?=20logging=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- woke/cli/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/woke/cli/__main__.py b/woke/cli/__main__.py index 9141048d4..3366dc8e6 100644 --- a/woke/cli/__main__.py +++ b/woke/cli/__main__.py @@ -55,6 +55,7 @@ def exit(): format="%(asctime)s %(name)s: %(message)s", handlers=[RichHandler(show_time=False, console=console)], level=(logging.WARNING if not debug else logging.DEBUG), + force=True, # pyright: ignore reportGeneralTypeIssues ) ctx.ensure_object(dict) @@ -63,7 +64,9 @@ def exit(): if platform.system() == "Windows": asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy()) else: - asyncio.get_event_loop_policy().set_child_watcher(ThreadedChildWatcher()) + asyncio.get_event_loop_policy().set_child_watcher( + ThreadedChildWatcher() # pyright: ignore reportUnboundVariable + ) os.environ["PYTHONBREAKPOINT"] = "ipdb.set_trace"