Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
aodag committed Jan 21, 2017
1 parent bc51576 commit d50f3aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pip/req/req_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ def update_editable(self, obtain=True):
def confirm_dependencies(self, installed_packages):
dep_keys = set()
for dist in installed_packages:
dep_keys.update([dist for d in dist.requires() if d.key == self.req.name])
dep_keys.update(
[dist for d in dist.requires() if d.key == self.req.name])
if not dep_keys:
return True
print("%s is depended from:" % self.req)
Expand Down
6 changes: 4 additions & 2 deletions pip/req/req_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
UnsupportedPythonVersion)
from pip.req.req_install import InstallRequirement
from pip.utils import (
display_path, dist_in_usersite, ensure_dir, normalize_path, get_installed_distributions)
display_path, dist_in_usersite, ensure_dir, normalize_path,
get_installed_distributions)
from pip.utils.hashes import MissingHashes
from pip.utils.logging import indent_log
from pip.utils.packaging import check_dist_requires_python
Expand Down Expand Up @@ -344,7 +345,8 @@ def uninstall(self, auto_confirm=False):
for req in self.requirements.values():
if req.constraint:
continue
if not req.confirm_dependencies(installed_packages):
if not (auto_confirm or
req.confirm_dependencies(installed_packages)):
continue
req.uninstall(auto_confirm=auto_confirm)
req.uninstalled_pathset.commit()
Expand Down

0 comments on commit d50f3aa

Please sign in to comment.