Skip to content

Commit

Permalink
Rename populate_requirement_set to get_requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
chrahunt committed Feb 6, 2020
1 parent 543c844 commit e7998a3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/pip/_internal/cli/req_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def make_resolver(
py_version_info=py_version_info,
)

def populate_requirement_set(
def get_requirements(
self,
args, # type: List[str]
options, # type: Values
Expand All @@ -281,7 +281,7 @@ def populate_requirement_set(
):
# type: (...) -> List[InstallRequirement]
"""
Marshal cmd line args into a requirement set.
Parse command-line arguments into the corresponding requirements.
"""
requirement_set = RequirementSet(
check_supported_wheels=check_supported_wheels
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_internal/commands/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def run(self, options, args):
with get_requirement_tracker() as req_tracker, TempDirectory(
options.build_dir, delete=build_delete, kind="download"
) as directory:
reqs = self.populate_requirement_set(
reqs = self.get_requirements(
args,
options,
finder,
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_internal/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def run(self, options, args):
options.build_dir, delete=build_delete, kind="install"
) as directory:
try:
reqs = self.populate_requirement_set(
reqs = self.get_requirements(
args, options, finder, session,
wheel_cache, check_supported_wheels=not options.target_dir,
)
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_internal/commands/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def run(self, options, args):
options.build_dir, delete=build_delete, kind="wheel"
) as directory:
try:
reqs = self.populate_requirement_set(
reqs = self.get_requirements(
args, options, finder, session,
wheel_cache
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_req.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def test_missing_hash_with_require_hashes_in_reqs_file(self, data, tmpdir):
command = create_command('install')
with requirements_file('--require-hashes', tmpdir) as reqs_file:
options, args = command.parse_args(['-r', reqs_file])
command.populate_requirement_set(
command.get_requirements(
args, options, finder, session, wheel_cache=None,
)
assert options.require_hashes
Expand Down

0 comments on commit e7998a3

Please sign in to comment.