From 7d9537384b0ed8c06c46b162474570509562742f Mon Sep 17 00:00:00 2001 From: Orel Yehuda Date: Mon, 8 Jul 2024 09:48:05 -0700 Subject: [PATCH] flake8 & black & isort reformatting --- python/ctranslate2/__init__.py | 2 +- python/ctranslate2/profiling.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/ctranslate2/__init__.py b/python/ctranslate2/__init__.py index c783d4ec0..46ada00d5 100644 --- a/python/ctranslate2/__init__.py +++ b/python/ctranslate2/__init__.py @@ -42,7 +42,7 @@ ) from ctranslate2.extensions import register_extensions from ctranslate2.logging import get_log_level, set_log_level - from ctranslate2.profiling import init_profiler, dump_profiler + from ctranslate2.profiling import dump_profiler, init_profiler register_extensions() del register_extensions diff --git a/python/ctranslate2/profiling.py b/python/ctranslate2/profiling.py index 5f1eeef41..6663a0ea5 100644 --- a/python/ctranslate2/profiling.py +++ b/python/ctranslate2/profiling.py @@ -1,7 +1,9 @@ -from ctranslate2 import _ext, Device import sys -def init_profiler(device = Device.cpu, num_threads = 1): +from ctranslate2 import Device, _ext + + +def init_profiler(device=Device.cpu, num_threads=1): _ext.init_profiling(device, num_threads)