Change argument name to better reflect purpose.

Also assert on provided path, since it should have been created in all
cases.
This commit is contained in:
Chris Hunt 2019-09-11 19:03:57 -04:00
parent 56b6fcc83b
commit 81d8005bd1
4 changed files with 7 additions and 5 deletions

View File

@ -141,7 +141,7 @@ class RequirementCommand(IndexGroupCommand):
@staticmethod
def make_requirement_preparer(
temp_directory, # type: TempDirectory
temp_build_dir, # type: TempDirectory
options, # type: Values
req_tracker, # type: RequirementTracker
download_dir=None, # type: str
@ -151,8 +151,10 @@ class RequirementCommand(IndexGroupCommand):
"""
Create a RequirementPreparer instance for the given parameters.
"""
temp_build_dir_path = temp_build_dir.path
assert temp_build_dir_path is not None
return RequirementPreparer(
build_dir=temp_directory.path,
build_dir=temp_build_dir_path,
src_dir=options.src_dir,
download_dir=download_dir,
wheel_download_dir=wheel_download_dir,

View File

@ -125,7 +125,7 @@ class DownloadCommand(RequirementCommand):
)
preparer = self.make_requirement_preparer(
temp_directory=directory,
temp_build_dir=directory,
options=options,
req_tracker=req_tracker,
download_dir=options.download_dir,

View File

@ -358,7 +358,7 @@ class InstallCommand(RequirementCommand):
wheel_cache
)
preparer = self.make_requirement_preparer(
temp_directory=directory,
temp_build_dir=directory,
options=options,
req_tracker=req_tracker,
)

View File

@ -136,7 +136,7 @@ class WheelCommand(RequirementCommand):
)
preparer = self.make_requirement_preparer(
temp_directory=directory,
temp_build_dir=directory,
options=options,
req_tracker=req_tracker,
wheel_download_dir=options.wheel_dir,