From 3eba3a0578fc7ee9a9baa9c2d19cc973e751771b Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 9 Oct 2023 18:23:56 +0200 Subject: [PATCH 1/2] Creating a list from a list is equivalent to a copy In that case, I find calling .copy() is more readable. --- src/highdicom/seg/sop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highdicom/seg/sop.py b/src/highdicom/seg/sop.py index 33b5b149..17473fe7 100644 --- a/src/highdicom/seg/sop.py +++ b/src/highdicom/seg/sop.py @@ -2174,7 +2174,7 @@ def _get_ref_instance_uids(self) -> List[Tuple[str, str, str]]: f'duplicated referenced SOP Instance UID items: {display_str}.' ) - return list(unique_instance_data) + return unique_instance_data.copy() def _build_luts(self) -> None: """Build lookup tables for efficient querying. From 28a6ba515d9425a58a8652dc6924ad8a95111235 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:57:02 +0200 Subject: [PATCH 2/2] Update src/highdicom/seg/sop.py Co-authored-by: Chris Bridge --- src/highdicom/seg/sop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highdicom/seg/sop.py b/src/highdicom/seg/sop.py index 17473fe7..f28218fc 100644 --- a/src/highdicom/seg/sop.py +++ b/src/highdicom/seg/sop.py @@ -2174,7 +2174,7 @@ def _get_ref_instance_uids(self) -> List[Tuple[str, str, str]]: f'duplicated referenced SOP Instance UID items: {display_str}.' ) - return unique_instance_data.copy() + return unique_instance_data def _build_luts(self) -> None: """Build lookup tables for efficient querying.