diff --git a/src/pip/_internal/operations/install/wheel.py b/src/pip/_internal/operations/install/wheel.py index f6ca96297..99fc50cb4 100644 --- a/src/pip/_internal/operations/install/wheel.py +++ b/src/pip/_internal/operations/install/wheel.py @@ -314,7 +314,7 @@ def install_unpacked_wheel( source = wheeldir.rstrip(os.path.sep) + os.path.sep try: - info_dir = wheel_dist_info_dir(source, req_description, name) + info_dir = wheel_dist_info_dir(source, name) metadata = wheel_metadata(wheeldir) version = wheel_version(metadata) except UnsupportedWheel as e: @@ -624,8 +624,8 @@ def install_wheel( ) -def wheel_dist_info_dir(source, req_description, name): - # type: (str, str, str) -> str +def wheel_dist_info_dir(source, name): + # type: (str, str) -> str """Returns the name of the contained .dist-info directory. Raises AssertionError or UnsupportedWheel if not found, >1 found, or diff --git a/tests/unit/test_wheel.py b/tests/unit/test_wheel.py index 3acf0fe63..31dc064fd 100644 --- a/tests/unit/test_wheel.py +++ b/tests/unit/test_wheel.py @@ -194,27 +194,27 @@ def test_get_csv_rows_for_installed__long_lines(tmpdir, caplog): def test_wheel_dist_info_dir_found(tmpdir): expected = "simple-0.1.dist-info" tmpdir.joinpath(expected).mkdir() - assert wheel.wheel_dist_info_dir(str(tmpdir), "", "simple") == expected + assert wheel.wheel_dist_info_dir(str(tmpdir), "simple") == expected def test_wheel_dist_info_dir_multiple(tmpdir): tmpdir.joinpath("simple-0.1.dist-info").mkdir() tmpdir.joinpath("unrelated-0.1.dist-info").mkdir() with pytest.raises(UnsupportedWheel) as e: - wheel.wheel_dist_info_dir(str(tmpdir), "", "simple") + wheel.wheel_dist_info_dir(str(tmpdir), "simple") assert "multiple .dist-info directories found" in str(e.value) def test_wheel_dist_info_dir_none(tmpdir): with pytest.raises(UnsupportedWheel) as e: - wheel.wheel_dist_info_dir(str(tmpdir), "", "simple") + wheel.wheel_dist_info_dir(str(tmpdir), "simple") assert "directory not found" in str(e.value) def test_wheel_dist_info_dir_wrong_name(tmpdir): tmpdir.joinpath("unrelated-0.1.dist-info").mkdir() with pytest.raises(UnsupportedWheel) as e: - wheel.wheel_dist_info_dir(str(tmpdir), "", "simple") + wheel.wheel_dist_info_dir(str(tmpdir), "simple") assert "does not start with 'simple'" in str(e.value)