Skip to content

Commit

Permalink
or if [ is in packages
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth Reitz <[email protected]>
  • Loading branch information
kennethreitz committed Sep 22, 2017
1 parent df64f81 commit 9c12ba5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pipenv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@

def suggest_package(package):
"""Suggests a package name, given a package name."""
if '-' in package:
if ('-' in package) or ('[' in package):
THRESHOLD = 90
else:
THRESHOLD = 86
Expand All @@ -280,6 +280,9 @@ def suggest_package(package):
return package

result = fuzzywuzzy.process.extractOne(package, packages)

print(result)

if result[1] > THRESHOLD:
return result[0]

Expand Down

0 comments on commit 9c12ba5

Please sign in to comment.