Skip to content

Commit

Permalink
Remove unused functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrahunt committed Sep 19, 2019
1 parent 236bfac commit ceffb0e
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/pip/_internal/utils/unpacking.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import logging
import os
import re
import shutil
import stat
import tarfile
Expand All @@ -25,7 +24,7 @@
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

if MYPY_CHECK_RUNNING:
from typing import Iterable, List, Optional, Match, Text, Union
from typing import Iterable, List, Optional, Text, Union


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -54,23 +53,6 @@ def current_umask():
return mask


def file_contents(filename):
# type: (str) -> Text
with open(filename, 'rb') as fp:
return fp.read().decode('utf-8')


def is_svn_page(html):
# type: (Union[str, Text]) -> Optional[Match[Union[str, Text]]]
"""
Returns true if the page appears to be the index page of an svn repository
"""
return (
re.search(r'<title>[^<]*Revision \d+:', html) and
re.search(r'Powered by (?:<a[^>]*?>)?Subversion', html, re.I)
)


def split_leading_dir(path):
# type: (Union[str, Text]) -> List[Union[str, Text]]
path = path.lstrip('/').lstrip('\\')
Expand Down

0 comments on commit ceffb0e

Please sign in to comment.