From cc7cc3f2ab213e8d8adbcccb3d589edf7926dbd7 Mon Sep 17 00:00:00 2001 From: Jaekwon Bang Date: Thu, 12 Jun 2025 15:42:39 +0900 Subject: [PATCH] Remove duplicated comment --- src/fosslight_util/oss_item.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/fosslight_util/oss_item.py b/src/fosslight_util/oss_item.py index c31eab7..0154a7c 100644 --- a/src/fosslight_util/oss_item.py +++ b/src/fosslight_util/oss_item.py @@ -82,14 +82,15 @@ def comment(self): return self._comment @comment.setter - def comment(self, value): - if not value: + def comment(self, new_comment): + if not new_comment: self._comment = "" else: if self._comment: - self._comment = f"{self._comment} / {value}" + if new_comment.strip() not in self._comment: + self._comment = f"{self._comment}\n{new_comment}" else: - self._comment = value + self._comment = new_comment class FileItem: