Skip to content

Commit

Permalink
Merge pull request #5799 from cjerdonek/simplify-get-src-requirement
Browse files Browse the repository at this point in the history
Remove two unreachable returns in VersionControl.get_src_requirement()
  • Loading branch information
pradyunsg committed Sep 24, 2018
2 parents a1b326d + 59b8a80 commit 9408cd9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
Empty file.
2 changes: 0 additions & 2 deletions src/pip/_internal/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ def get_src_requirement(self, dist, location):
if not repo.lower().startswith('git:'):
repo = 'git+' + repo
egg_project_name = dist.egg_name().split('-', 1)[0]
if not repo:
return None
current_rev = self.get_revision(location)
req = '%s@%s#egg=%s' % (repo, current_rev, egg_project_name)
subdirectory = self._get_subdirectory(location)
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/vcs/mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def get_src_requirement(self, dist, location):
if not repo.lower().startswith('hg:'):
repo = 'hg+' + repo
egg_project_name = dist.egg_name().split('-', 1)[0]
if not repo:
return None
current_rev_hash = self.get_revision_hash(location)
return '%s@%s#egg=%s' % (repo, current_rev_hash, egg_project_name)

Expand Down

0 comments on commit 9408cd9

Please sign in to comment.