Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 2, 2023
1 parent dd445cc commit 327b574
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion voila/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 7 additions & 6 deletions voila/voila_kernel_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 327b574

Please sign in to comment.