From cd331b693d6c98fa3e8d23a3eb3a2dbe3f1c9c6f Mon Sep 17 00:00:00 2001 From: "jinli.yl" Date: Thu, 20 Jun 2024 22:20:27 +0800 Subject: [PATCH] [dev] foramt code --- memory_scope/definition/memory_node.py | 1 - memory_scope/definition/message.py | 2 +- memory_scope/utils/logger.py | 2 +- memory_scope/utils/registry.py | 5 ----- memory_scope/utils/timer.py | 2 -- memory_scope/utils/tool_functions.py | 3 ++- memory_scope/worker/base_worker.py | 1 - 7 files changed, 4 insertions(+), 12 deletions(-) diff --git a/memory_scope/definition/memory_node.py b/memory_scope/definition/memory_node.py index 5e0061a4..3ca84a86 100644 --- a/memory_scope/definition/memory_node.py +++ b/memory_scope/definition/memory_node.py @@ -17,4 +17,3 @@ class MemoryNode(BaseModel): status: str = Field("active", description="active or expired") vector: List[float] = Field([], description="content embedding result, return empty") - diff --git a/memory_scope/definition/message.py b/memory_scope/definition/message.py index b6e8f785..cc44268c 100644 --- a/memory_scope/definition/message.py +++ b/memory_scope/definition/message.py @@ -6,4 +6,4 @@ class Message(BaseModel): content: str = Field(..., description="The body of the message") - time_created: int = Field("", description="Timestamp when the message was created") \ No newline at end of file + time_created: int = Field("", description="Timestamp when the message was created") diff --git a/memory_scope/utils/logger.py b/memory_scope/utils/logger.py index c71d153d..a1fc0cf7 100644 --- a/memory_scope/utils/logger.py +++ b/memory_scope/utils/logger.py @@ -92,4 +92,4 @@ class Logger(logging.Logger): if name not in LOGGER_DICT: LOGGER_DICT[name] = Logger(name=name, **kwargs) - return LOGGER_DICT[name] \ No newline at end of file + return LOGGER_DICT[name] diff --git a/memory_scope/utils/registry.py b/memory_scope/utils/registry.py index 0797f9a5..0eb8ee75 100644 --- a/memory_scope/utils/registry.py +++ b/memory_scope/utils/registry.py @@ -2,7 +2,6 @@ Registry for different modules. Init class according to the class name and verify the input parameters. """ -import inspect from typing import Dict, Any, List @@ -26,7 +25,3 @@ class Registry(object): def __getitem__(self, module_name: str): assert module_name in self.module_dict, f'{module_name} not found in {self.name}' return self.module_dict[module_name] - - - - diff --git a/memory_scope/utils/timer.py b/memory_scope/utils/timer.py index e3ab0d4d..be7df83f 100644 --- a/memory_scope/utils/timer.py +++ b/memory_scope/utils/timer.py @@ -1,5 +1,3 @@ - - import time from memory_scope.utils.logger import Logger diff --git a/memory_scope/utils/tool_functions.py b/memory_scope/utils/tool_functions.py index 653e58e1..1cbf91b2 100644 --- a/memory_scope/utils/tool_functions.py +++ b/memory_scope/utils/tool_functions.py @@ -1,5 +1,6 @@ -from importlib import import_module import re +from importlib import import_module + from memory_scope.enumeration.message_role_enum import MessageRoleEnum diff --git a/memory_scope/worker/base_worker.py b/memory_scope/worker/base_worker.py index fd2972b7..f9c39b55 100644 --- a/memory_scope/worker/base_worker.py +++ b/memory_scope/worker/base_worker.py @@ -68,4 +68,3 @@ class BaseWorker(object): if not self._name_simple: self._name_simple = self.__class__.__name__.replace("Worker", "") return self._name_simple -