summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-20 18:02:00 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-20 18:02:00 +0000
commit545ed8bfffec276ba46aeabfb0fc469eacaf8d91 (patch)
tree9ec25ce861d26063492f6ce67be0e640f6c263d1 /setuptools
parent5f850a21dba790c197b85e719d49137e4cce17ea (diff)
downloadpython-setuptools-git-545ed8bfffec276ba46aeabfb0fc469eacaf8d91.tar.gz
Avoid exhausting iterator
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/config/pyprojecttoml.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py
index 536247be..9ce55022 100644
--- a/setuptools/config/pyprojecttoml.py
+++ b/setuptools/config/pyprojecttoml.py
@@ -314,9 +314,8 @@ class _ConfigExpander:
with _ignore_errors(self.ignore_option_errors):
root_dir = self.root_dir
if "file" in directive:
- files = always_iterable(directive["file"])
- self._referenced_files.update(files)
- return _expand.read_files(files, root_dir)
+ self._referenced_files.update(always_iterable(directive["file"]))
+ return _expand.read_files(directive["file"], root_dir)
if "attr" in directive:
return _expand.read_attr(directive["attr"], package_dir, root_dir)
raise ValueError(f"invalid `{specifier}`: {directive!r}")