Skip to content

Commit cc7cc3f

Browse files
committed
Remove duplicated comment
1 parent 5858dae commit cc7cc3f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/fosslight_util/oss_item.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ def comment(self):
8282
return self._comment
8383

8484
@comment.setter
85-
def comment(self, value):
86-
if not value:
85+
def comment(self, new_comment):
86+
if not new_comment:
8787
self._comment = ""
8888
else:
8989
if self._comment:
90-
self._comment = f"{self._comment} / {value}"
90+
if new_comment.strip() not in self._comment:
91+
self._comment = f"{self._comment}\n{new_comment}"
9192
else:
92-
self._comment = value
93+
self._comment = new_comment
9394

9495

9596
class FileItem:

0 commit comments

Comments
 (0)