From ebbe2970e864ad685917fa2b080df296e31207a8 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 8 Oct 2023 16:06:32 +0200 Subject: [PATCH] =?UTF-8?q?{str(x)}=20=E2=86=92=20{x}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Casting to str is redundant, it is the default. https://docs.python.org/3/library/string.html#format-specification-mini-language --- pynetdicom/service_class.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pynetdicom/service_class.py b/pynetdicom/service_class.py index b0d0665ae2..5375d08459 100644 --- a/pynetdicom/service_class.py +++ b/pynetdicom/service_class.py @@ -289,7 +289,7 @@ def _c_find_scp(self, req: C_FIND, context: "PresentationContext") -> None: LOGGER.error( "\nTraceback (most recent call last):\n" + "".join(traceback.format_tb(exc[2])) - + f"{exc[0].__name__}: {str(exc[1])}" # type: ignore + + f"{exc[0].__name__}: {exc[1]}" # type: ignore ) rsp_status = 0xC311 dataset = None @@ -1707,7 +1707,7 @@ def _add_failed_instance(ds: Dataset) -> None: LOGGER.error( "\nTraceback (most recent call last):\n" + "".join(traceback.format_tb(exc[2])) - + f"{exc[0].__name__}: {str(exc[1])}" # type: ignore + + f"{exc[0].__name__}: {exc[1]}" # type: ignore ) rsp_status = 0xC411 dataset = None @@ -2131,7 +2131,7 @@ def _add_failed_instance(ds: Dataset) -> None: LOGGER.error( "\nTraceback (most recent call last):\n" + "".join(traceback.format_tb(exc[2])) - + f"{exc[0].__name__}: {str(exc[1])}" # type: ignore + + f"{exc[0].__name__}: {exc[1]}" # type: ignore ) rsp_status = 0xC511 dataset = None