From 327b5742b0e3293f665cbd72fd6c79dc220c7db5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 11:57:34 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- voila/app.py | 2 +- voila/voila_kernel_manager.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/voila/app.py b/voila/app.py index ef458fffb..647128ff9 100644 --- a/voila/app.py +++ b/voila/app.py @@ -552,7 +552,7 @@ def init_settings(self) -> Dict: if preheat_kernel and self.prelaunch_hook: raise Exception("`preheat_kernel` and `prelaunch_hook` are incompatible") - print('--- DEBUG preheat', preheat_kernel) + print("--- DEBUG preheat", preheat_kernel) kernel_manager_class = voila_kernel_manager_factory( self.voila_configuration.multi_kernel_manager_class, diff --git a/voila/voila_kernel_manager.py b/voila/voila_kernel_manager.py index 843fb297d..13dddf48f 100644 --- a/voila/voila_kernel_manager.py +++ b/voila/voila_kernel_manager.py @@ -54,8 +54,8 @@ def voila_kernel_manager_factory( T: Decorated class """ if not preheat_kernel: + print("--- DEBUG created NON preheat manager") - print('--- DEBUG created NON preheat manager') class NormalKernelManager(base_class): @property def notebook_data(self) -> TypeDict: @@ -67,8 +67,7 @@ def get_pool_size(self, nb: str) -> int: return NormalKernelManager else: - - print('--- DEBUG created preheat manager') + print("--- DEBUG created preheat manager") class VoilaKernelManager(base_class): """This class adds pooling heated kernels and pre-rendered notebook @@ -244,8 +243,8 @@ def fill_if_needed( kwargs["env"] = kernel_env heated = len(pool) - print('--- DEBUG pool of', heated) - print('--- DEBUG kernel size', kernel_size) + print("--- DEBUG pool of", heated) + print("--- DEBUG kernel size", kernel_size) def task_counter(tk): nonlocal heated @@ -262,7 +261,9 @@ def task_counter(tk): task = loop.create_task( wait_before( delay, - partialmethod(self._initialize, notebook_name, None, **kwargs), + partialmethod( + self._initialize, notebook_name, None, **kwargs + ), ) ) pool.append(task)