mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
BUG: remove package/version duplicates
This commit is contained in:
parent
1a990b52d5
commit
243e6e6833
@ -184,7 +184,16 @@ def get_import_local(imports, encoding=None):
|
||||
for item in imports:
|
||||
if item.lower() in local:
|
||||
result.append(local[item.lower()])
|
||||
return result
|
||||
|
||||
# removing duplicates of package/version
|
||||
result_unique = [
|
||||
dict(t)
|
||||
for t in set([
|
||||
tuple(d.items()) for d in result
|
||||
])
|
||||
]
|
||||
|
||||
return result_unique
|
||||
|
||||
|
||||
def get_pkg_names(pkgs):
|
||||
|
Loading…
x
Reference in New Issue
Block a user