From 0ee245bc6df60b911fafe81a743ec2a68a063c20 Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Sat, 1 Dec 2018 19:03:55 +0100 Subject: MAINT: Use list and dict comprehension when possible (#12445) * Use list comprehension * More list comprehension migration * Revert key copying in dict * A few more fixes * More reverts * Use dict comprehension * Fix dict comprehension * Address review comments * More review comments * Fix for empty unpacking of zip(* * Revert zip(* unpacking altogether * Fix dict copying * More simplifications --- numpy/distutils/npy_pkg_config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'numpy/distutils/npy_pkg_config.py') diff --git a/numpy/distutils/npy_pkg_config.py b/numpy/distutils/npy_pkg_config.py index ea16e772d..bfe8b9f77 100644 --- a/numpy/distutils/npy_pkg_config.py +++ b/numpy/distutils/npy_pkg_config.py @@ -222,9 +222,7 @@ def parse_meta(config): if not config.has_section('meta'): raise FormatError("No meta section found !") - d = {} - for name, value in config.items('meta'): - d[name] = value + d = dict(config.items('meta')) for k in ['name', 'description', 'version']: if not k in d: -- cgit v1.2.1