aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-10-28 14:05:57 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-10-28 14:05:57 -0400
commitad043d61d3bfff3ca69f477f44a718597a34e779 (patch)
tree2305cd248272dd72789a267f20d8d9f8c71f98bc
parent3c128c79b2c9eb014762f072fcb9878a0570fae3 (diff)
downloadexternal_python_setuptools-ad043d61d3bfff3ca69f477f44a718597a34e779.tar.gz
external_python_setuptools-ad043d61d3bfff3ca69f477f44a718597a34e779.tar.bz2
external_python_setuptools-ad043d61d3bfff3ca69f477f44a718597a34e779.zip
Feed the hobgoblins (delint).
-rw-r--r--setuptools/config.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/setuptools/config.py b/setuptools/config.py
index 73a3bf70..4cc1cb38 100644
--- a/setuptools/config.py
+++ b/setuptools/config.py
@@ -110,7 +110,8 @@ def parse_configuration(
options.parse()
meta = ConfigMetadataHandler(
- distribution.metadata, command_options, ignore_option_errors, distribution.package_dir)
+ distribution.metadata, command_options, ignore_option_errors,
+ distribution.package_dir)
meta.parse()
return meta, options
@@ -458,9 +459,12 @@ class ConfigMetadataHandler(ConfigHandler):
# Be strict about versions loaded from file because it's easy to
# accidentally include newlines and other unintended content
if isinstance(parse(version), LegacyVersion):
- raise DistutilsOptionError('Version loaded from %s does not comply with PEP 440: %s' % (
- value, version
- ))
+ tmpl = (
+ 'Version loaded from {value} does not '
+ 'comply with PEP 440: {version}'
+ )
+ raise DistutilsOptionError(tmpl.format(**locals()))
+
return version
version = self._parse_attr(value, self.package_dir)
@@ -518,12 +522,13 @@ class ConfigOptionsHandler(ConfigHandler):
find_directives = ['find:', 'find_namespace:']
trimmed_value = value.strip()
- if not trimmed_value in find_directives:
+ if trimmed_value not in find_directives:
return self._parse_list(value)
findns = trimmed_value == find_directives[1]
if findns and not PY3:
- raise DistutilsOptionError('find_namespace: directive is unsupported on Python < 3.3')
+ raise DistutilsOptionError(
+ 'find_namespace: directive is unsupported on Python < 3.3')
# Read function arguments from a dedicated section.
find_kwargs = self.parse_section_packages__find(