aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-02-19 21:08:48 -0500
committerJason R. Coombs <jaraco@jaraco.com>2019-02-20 08:37:06 -0500
commitc52a0abf7d752aab2faab10fe8221a3dc68104cb (patch)
treef41acbc94a0f1e887069bb00be6d4bb58c8eef65
parent0fc0f58fdb0dcb21cf3d2029d3ae4b735f39b1fd (diff)
downloadexternal_python_setuptools-c52a0abf7d752aab2faab10fe8221a3dc68104cb.tar.gz
external_python_setuptools-c52a0abf7d752aab2faab10fe8221a3dc68104cb.tar.bz2
external_python_setuptools-c52a0abf7d752aab2faab10fe8221a3dc68104cb.zip
Prefer dict comprehension
-rw-r--r--setuptools/config.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/config.py b/setuptools/config.py
index b6626043..26ad316b 100644
--- a/setuptools/config.py
+++ b/setuptools/config.py
@@ -382,11 +382,11 @@ class ConfigHandler:
:param callable values_parser:
:rtype: dict
"""
- value = {}
values_parser = values_parser or (lambda val: val)
- for key, (_, val) in section_options.items():
- value[key] = values_parser(val)
- return value
+ return {
+ key: values_parser(val)
+ for key, (_, val) in section_options.items()
+ }
def parse_section(self, section_options):
"""Parses configuration file section.