Skip to content

Commit

Permalink
Merge pull request #473 from amundhov/topic/entrypoints_repr
Browse files Browse the repository at this point in the history
With commit 0c81964 the behavior of …
  • Loading branch information
jaraco authored Dec 1, 2023
2 parents eeb6e21 + 066e24d commit 650996f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,14 @@ def __getitem__(self, name: str) -> EntryPoint: # type: ignore[override]
except StopIteration:
raise KeyError(name)

def __repr__(self):
"""
Repr with classname and tuple constructor to
signal that we deviate from regular tuple behavior.
"""
return '%s(%r)' % (self.__class__.__name__, tuple(self))


def select(self, **params):
"""
Select entry points from self that match the
Expand Down

0 comments on commit 650996f

Please sign in to comment.