Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Commit

Permalink
feat(dep): add scoped package support
Browse files Browse the repository at this point in the history
Fixes #160
  • Loading branch information
opichals committed Aug 16, 2018
1 parent 8057d11 commit 820e69e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions blackbelt/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,13 @@ def check_pre_approval_elligibility(details):

def parse_dep(dep):
split_result = re.split(r'==|@', dep)
try:
return (split_result[0], split_result[1])
except IndexError:
return (split_result[0], 'latest')
if split_result[0] != '':
try:
return (split_result[0], split_result[1])
except IndexError:
return (split_result[0], 'latest')
else:
try:
return ('@' + split_result[1], split_result[2])
except IndexError:
return ('@' + split_result[1], 'latest')

0 comments on commit 820e69e

Please sign in to comment.