aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap/wrap.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-01-06 15:27:38 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-01-08 15:28:17 +0100
commit09b53c534f74806ebc49bb2fcdfbae0e3b26fb84 (patch)
tree4466a6005333d6d1ae7d67cbaf24fb63e104df6a /mesonbuild/wrap/wrap.py
parentf3199edaf8802e2a59fed2f83e825e09b9d4bd0d (diff)
downloadmeson-09b53c534f74806ebc49bb2fcdfbae0e3b26fb84.zip
meson-09b53c534f74806ebc49bb2fcdfbae0e3b26fb84.tar.gz
meson-09b53c534f74806ebc49bb2fcdfbae0e3b26fb84.tar.bz2
types: import typing as T (fixes #6333)
Diffstat (limited to 'mesonbuild/wrap/wrap.py')
-rw-r--r--mesonbuild/wrap/wrap.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 3ea1f1e..abbeb9e 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -25,12 +25,12 @@ import stat
import subprocess
import sys
import configparser
-import typing
+import typing as T
from . import WrapMode
from ..mesonlib import ProgressBar, MesonException
-if typing.TYPE_CHECKING:
+if T.TYPE_CHECKING:
import http.client
try:
@@ -48,7 +48,7 @@ ssl_warning_printed = False
whitelist_subdomain = 'wrapdb.mesonbuild.com'
-def quiet_git(cmd: typing.List[str], workingdir: str) -> typing.Tuple[bool, str]:
+def quiet_git(cmd: T.List[str], workingdir: str) -> T.Tuple[bool, str]:
git = shutil.which('git')
if not git:
return False, 'Git program not found.'
@@ -258,7 +258,7 @@ class Resolver:
raise WrapException('Git program not found.')
revno = self.wrap.get('revision')
is_shallow = False
- depth_option = [] # type: typing.List[str]
+ depth_option = [] # type: T.List[str]
if self.wrap.values.get('depth', '') != '':
is_shallow = True
depth_option = ['--depth', self.wrap.values.get('depth')]
@@ -330,7 +330,7 @@ class Resolver:
subprocess.check_call([svn, 'checkout', '-r', revno, self.wrap.get('url'),
self.directory], cwd=self.subdir_root)
- def get_data(self, urlstring: str) -> typing.Tuple[str, str]:
+ def get_data(self, urlstring: str) -> T.Tuple[str, str]:
blocksize = 10 * 1024
h = hashlib.sha256()
tmpfile = tempfile.NamedTemporaryFile(mode='wb', dir=self.cachedir, delete=False)