diff --git a/importlib_metadata/__init__.py b/importlib_metadata/__init__.py index edcf2691..2e5e953d 100644 --- a/importlib_metadata/__init__.py +++ b/importlib_metadata/__init__.py @@ -157,8 +157,9 @@ def __reduce__(self): class EntryPoints(tuple): """ - A collection of EntryPoint objects, retrievable by name. + An immutable collection of EntryPoint objects, retrievable by name. """ + __slots__ = () def __getitem__(self, name) -> EntryPoint: try: @@ -173,8 +174,9 @@ def names(self): class GroupedEntryPoints(tuple): """ - A collection of EntryPoint objects, retrievable by group. + An immutable collection of EntryPoint objects, retrievable by group. """ + __slots__ = () def __getitem__(self, group) -> EntryPoints: return EntryPoints(ep for ep in self if ep.group == group)