Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue_508] add methods to remove duplicated items from list properties #591

Merged
merged 1 commit into from Apr 18, 2023

Conversation

meretp
Copy link
Collaborator

@meretp meretp commented Apr 18, 2023

fixes #508

Copy link
Collaborator

@armintaenzertng armintaenzertng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, only a minor remark.

list_without_duplicates = []
for element in list_with_potential_duplicates:
if element not in list_without_duplicates:
list_without_duplicates.append(deepcopy(element))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to deepcopy the element here as it is already a copy of the original document.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true! changed it.

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
@meretp meretp merged commit 873c635 into spdx:main Apr 18, 2023
32 checks passed
@meretp meretp deleted the issue_508_dont_write_duplicates branch April 18, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not output multiple identical LicenseInfoInFile
2 participants