Skip to content

Commit 14cce75

Browse files
committed
Prefer re.findall, which returns materialized results. Fixes #369.
1 parent b4661fd commit 14cce75

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v4.11.2
2+
=======
3+
4+
* #369: Fixed bug where ``EntryPoint.extras`` was returning
5+
match objects and not the extras strings.
6+
17
v4.11.1
28
=======
39

importlib_metadata/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def attr(self):
217217
@property
218218
def extras(self):
219219
match = self.pattern.match(self.value)
220-
return list(re.finditer(r'\w+', match.group('extras') or ''))
220+
return re.findall(r'\w+', match.group('extras') or '')
221221

222222
def _for(self, dist):
223223
vars(self).update(dist=dist)

0 commit comments

Comments
 (0)