Lines 944-957
def match_to_list(mypkg, mylist):
Link Here
|
944 |
@rtype: List |
944 |
@rtype: List |
945 |
@return: A unique list of package atoms that match the given package atom |
945 |
@return: A unique list of package atoms that match the given package atom |
946 |
""" |
946 |
""" |
947 |
matches = [] |
947 |
return [ x for x in set(mylist) if match_from_list(x, [mypkg]) ] |
948 |
for x in mylist: |
|
|
949 |
if not isinstance(x, Atom): |
950 |
x = Atom(x) |
951 |
if match_from_list(x, [mypkg]): |
952 |
if x not in matches: |
953 |
matches.append(x) |
954 |
return matches |
955 |
|
948 |
|
956 |
def best_match_to_list(mypkg, mylist): |
949 |
def best_match_to_list(mypkg, mylist): |
957 |
""" |
950 |
""" |