Skip to content

Commit 650996f

Browse files
authored
Merge pull request #473 from amundhov/topic/entrypoints_repr
With commit 0c81964 the behavior of …
2 parents eeb6e21 + 066e24d commit 650996f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

importlib_metadata/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,14 @@ def __getitem__(self, name: str) -> EntryPoint: # type: ignore[override]
293293
except StopIteration:
294294
raise KeyError(name)
295295

296+
def __repr__(self):
297+
"""
298+
Repr with classname and tuple constructor to
299+
signal that we deviate from regular tuple behavior.
300+
"""
301+
return '%s(%r)' % (self.__class__.__name__, tuple(self))
302+
303+
296304
def select(self, **params):
297305
"""
298306
Select entry points from self that match the

0 commit comments

Comments
 (0)