diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-05-18 19:44:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 19:44:57 +0300 |
commit | 5ec6151e56140a19ef185052ffb02bd1ff957bd7 (patch) | |
tree | 53346478d8e84aefd170ac6226938ca89d6d0a77 /mesonbuild/mintro.py | |
parent | a31bc4ede5883d449c15c90535b21bc8f9e28d6d (diff) | |
parent | 0e56ec2dbdbbd463d608c42e0aa117357e18936a (diff) | |
download | meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.zip meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.gz meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.bz2 |
Merge pull request #1810 from QuLogic/pycharm-warnings
Fix various warnings found in PyCharm
Diffstat (limited to 'mesonbuild/mintro.py')
-rw-r--r-- | mesonbuild/mintro.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index 88ea16e..525a41d 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -79,9 +79,7 @@ def list_installed(installdata): def list_targets(coredata, builddata, installdata): tlist = [] for (idname, target) in builddata.get_targets().items(): - t = {} - t['name'] = target.get_basename() - t['id'] = idname + t = {'name': target.get_basename(), 'id': idname} fname = target.get_filename() if isinstance(fname, list): fname = [os.path.join(target.subdir, x) for x in fname] @@ -132,9 +130,7 @@ def add_keys(optlist, options): keys.sort() for key in keys: opt = options[key] - optdict = {} - optdict['name'] = key - optdict['value'] = opt.value + optdict = {'name': key, 'value': opt.value} if isinstance(opt, coredata.UserStringOption): typestr = 'string' elif isinstance(opt, coredata.UserBooleanOption): @@ -190,9 +186,7 @@ def list_tests(testdata): print(json.dumps(result)) def list_projinfo(builddata): - result = {} - result['name'] = builddata.project_name - result['version'] = builddata.project_version + result = {'name': builddata.project_name, 'version': builddata.project_version} subprojects = [] for k, v in builddata.subprojects.items(): c = {'name': k, |