summaryrefslogtreecommitdiff
path: root/mesonbuild/mintro.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-08-11 12:57:16 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-08-11 13:39:07 -0400
commitde1cc0b02bcb1bab6977f0ab8bb3fef0cd0646dd (patch)
treeaf8e732793a701b8b10d9f0402e58c2a4250e4ec /mesonbuild/mintro.py
parenta01418db0a37908cc2504adbb0cf56d333348f9a (diff)
downloadmeson-de1cc0b02bcb1bab6977f0ab8bb3fef0cd0646dd.tar.gz
rewrite a couple comment-style type annotations for oddly indented dicts
Make them into real type annotations. These are the only ones that if automatically rewritten, would cause flake8 to error out with the message: "E128 continuation line under-indented for visual indent".
Diffstat (limited to 'mesonbuild/mintro.py')
-rw-r--r--mesonbuild/mintro.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index 9657da7c6..14f8d86b6 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -477,14 +477,18 @@ def list_machines(builddata: build.Build) -> T.Dict[str, T.Dict[str, T.Union[str
return machines
def list_projinfo(builddata: build.Build) -> T.Dict[str, T.Union[str, T.List[T.Dict[str, str]]]]:
- result = {'version': builddata.project_version,
- 'descriptive_name': builddata.project_name,
- 'subproject_dir': builddata.subproject_dir} # type: T.Dict[str, T.Union[str, T.List[T.Dict[str, str]]]]
+ result: T.Dict[str, T.Union[str, T.List[T.Dict[str, str]]]] = {
+ 'version': builddata.project_version,
+ 'descriptive_name': builddata.project_name,
+ 'subproject_dir': builddata.subproject_dir,
+ }
subprojects = []
for k, v in builddata.subprojects.items():
- c = {'name': k,
- 'version': v,
- 'descriptive_name': builddata.projects.get(k)} # type: T.Dict[str, str]
+ c: T.Dict[str, str] = {
+ 'name': k,
+ 'version': v,
+ 'descriptive_name': builddata.projects.get(k),
+ }
subprojects.append(c)
result['subprojects'] = subprojects
return result