mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Merge pull request #67 from ryuzakyl/hotfix/remove-package-duplicates
BUG: remove package/version duplicates
This commit is contained in:
commit
7f791ea93d
@ -184,7 +184,16 @@ def get_import_local(imports, encoding=None):
|
|||||||
for item in imports:
|
for item in imports:
|
||||||
if item.lower() in local:
|
if item.lower() in local:
|
||||||
result.append(local[item.lower()])
|
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):
|
def get_pkg_names(pkgs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user