summaryrefslogtreecommitdiff
path: root/mesonbuild/wrap/wraptool.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-01 23:32:14 -0500
committerEli Schwartz <eschwartz@archlinux.org>2022-03-07 19:01:04 -0500
commita009eacc65ddb447edcfc9fd317ad828d9b3353a (patch)
treeae1c6388bfa45eb0672bbed1d8f18ebe0b3c2819 /mesonbuild/wrap/wraptool.py
parent187dc656f48ba7a86a14a5c8d9f16a3b2b7d8770 (diff)
downloadmeson-a009eacc65ddb447edcfc9fd317ad828d9b3353a.tar.gz
treewide: string-quote the first argument to T.cast
Using future annotations, type annotations become strings at runtime and don't impact performance. This is not possible to do with T.cast though, because it is a function argument instead of an annotation. Quote the type argument everywhere in order to have the same effect as future annotations. This also allows linters to better detect in some cases that a given import is typing-only.
Diffstat (limited to 'mesonbuild/wrap/wraptool.py')
-rw-r--r--mesonbuild/wrap/wraptool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/wrap/wraptool.py b/mesonbuild/wrap/wraptool.py
index 664bfecfa..ca14315fb 100644
--- a/mesonbuild/wrap/wraptool.py
+++ b/mesonbuild/wrap/wraptool.py
@@ -60,7 +60,7 @@ def add_arguments(parser: 'argparse.ArgumentParser') -> None:
def get_releases() -> T.Dict[str, T.Any]:
url = urlopen('https://wrapdb.mesonbuild.com/v2/releases.json')
- return T.cast(T.Dict[str, T.Any], json.loads(url.read().decode()))
+ return T.cast('T.Dict[str, T.Any]', json.loads(url.read().decode()))
def list_projects(options: 'argparse.Namespace') -> None:
releases = get_releases()