Skip to content

Commit

Permalink
Remove unused format_tag
Browse files Browse the repository at this point in the history
Since we delegate tag formatting to packaging.tags.Tag, we don't need
this function or its tests.
  • Loading branch information
chrahunt committed Jan 7, 2020
1 parent 80b2c82 commit 58f175f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
9 changes: 0 additions & 9 deletions src/pip/_internal/pep425tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@
_osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)')


def format_tag(file_tag):
# type: (Tuple[str, ...]) -> str
"""Format three tags in the form "<python_tag>-<abi_tag>-<platform_tag>".
:param file_tag: A 3-tuple of tags (python_tag, abi_tag, platform_tag).
"""
return '-'.join(file_tag)


def get_config_var(var):
# type: (str) -> Optional[str]
return sysconfig.get_config_var(var)
Expand Down
9 changes: 0 additions & 9 deletions tests/unit/test_pep425tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@
from pip._internal import pep425tags


@pytest.mark.parametrize('file_tag, expected', [
(('py27', 'none', 'any'), 'py27-none-any'),
(('cp33', 'cp32dmu', 'linux_x86_64'), 'cp33-cp32dmu-linux_x86_64'),
])
def test_format_tag(file_tag, expected):
actual = pep425tags.format_tag(file_tag)
assert actual == expected


@pytest.mark.parametrize('version_info, expected', [
((2,), '2'),
((2, 8), '28'),
Expand Down

0 comments on commit 58f175f

Please sign in to comment.