MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / unique

Function unique

src/summarycode/score.py:200–210  ·  view source on GitHub ↗

Return a list of unique objects keeping the original order.

(objects)

Source from the content-addressed store, hash-verified

198
199
200def unique(objects):
201 """
202 Return a list of unique objects keeping the original order.
203 """
204 uniques = []
205 seen = set()
206 for obj in objects:
207 if obj not in seen:
208 uniques.append(obj)
209 seen.add(obj)
210 return uniques
211
212
213@attr.s()

Callers 4

get_declared_holdersFunction · 0.90
compute_license_scoreFunction · 0.70
get_primary_licenseFunction · 0.70

Calls 2

addMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected