Skip to content

Commit b928ef1

Browse files
committed
Fix commands.install.site_packages_writable signature
1 parent a1d0088 commit b928ef1

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/pip/_internal/commands/install.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -535,24 +535,28 @@ def _warn_about_conflicts(self, conflict_details):
535535

536536

537537
def get_lib_location_guesses(
538-
user=False, # type: bool
539-
home=None, # type: Optional[str]
540-
root=None, # type: Optional[str]
541-
isolated=False, # type: bool
542-
prefix=None # type: Optional[str]
538+
user=False, # type: bool
539+
home=None, # type: Optional[str]
540+
root=None, # type: Optional[str]
541+
isolated=False, # type: bool
542+
prefix=None, # type: Optional[str]
543543
):
544-
# type:(...) -> List[str]
544+
# type: (...) -> List[str]
545545
scheme = distutils_scheme('', user=user, home=home, root=root,
546546
isolated=isolated, prefix=prefix)
547547
return [scheme['purelib'], scheme['platlib']]
548548

549549

550-
def site_packages_writable(root, isolated):
551-
# type: (Optional[str], bool) -> bool
552-
return all(
553-
test_writable_dir(d) for d in set(
554-
get_lib_location_guesses(root=root, isolated=isolated))
555-
)
550+
def site_packages_writable(
551+
user=False, # type: bool
552+
root=None, # type: Optional[str]
553+
isolated=False, # type: bool
554+
prefix=None, # type: Optional[str]
555+
):
556+
# type: (...) -> bool
557+
return all(map(test_writable_dir, set(get_lib_location_guesses(
558+
user=user, root=root, isolated=isolated, prefix=prefix,
559+
))))
556560

557561

558562
def decide_user_install(

0 commit comments

Comments
 (0)