From 0a41d6787e134849da373ce56c154eedfe274b06 Mon Sep 17 00:00:00 2001 From: Henrique Joaquim Date: Fri, 25 Nov 2022 15:30:25 +0000 Subject: [PATCH] Enforce logging to use `str` (#3579) * updating dependencies * enforce the last method to keep args and kwargs as str only * Removed a modified file from pull request Co-authored-by: Chavithra --- openbb_terminal/core/library/operation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openbb_terminal/core/library/operation.py b/openbb_terminal/core/library/operation.py index 02ce00056e5..2d9fc1e952f 100644 --- a/openbb_terminal/core/library/operation.py +++ b/openbb_terminal/core/library/operation.py @@ -258,8 +258,8 @@ class OperationLogger: ) OperationLogger.last_method = { f"{self.__method_chosen.__module__}.{self.__method_chosen.__name__}": { - "args": self.__args, - "kwargs": self.__kwargs, + "args": str(self.__args)[:100], + "kwargs": str(self.__kwargs)[:100], } } @@ -288,8 +288,8 @@ class OperationLogger: def __check_last_method(self) -> bool: current_method = { f"{self.__method_chosen.__module__}.{self.__method_chosen.__name__}": { - "args": self.__args, - "kwargs": self.__kwargs, + "args": str(self.__args)[:100], + "kwargs": str(self.__kwargs)[:100], } } return OperationLogger.last_method == current_method