File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -167,21 +167,33 @@ class EntryPoints(tuple):
167
167
__slots__ = ()
168
168
169
169
def __getitem__ (self , name ): # -> EntryPoint:
170
+ """
171
+ Get the EntryPoint in self matching name.
172
+ """
170
173
try :
171
174
return next (iter (self .select (name = name )))
172
175
except StopIteration :
173
176
raise KeyError (name )
174
177
175
178
def select (self , ** params ):
179
+ """
180
+ Select entry points from self that match the
181
+ given parameters (typically group and/or name).
182
+ """
176
183
return EntryPoints (ep for ep in self if ep .matches (** params ))
177
184
178
185
@property
179
186
def names (self ):
187
+ """
188
+ Return the set of all names of all entry points.
189
+ """
180
190
return set (ep .name for ep in self )
181
191
182
192
@property
183
193
def groups (self ):
184
194
"""
195
+ Return the set of all groups of all entry points.
196
+
185
197
For coverage while SelectableGroups is present.
186
198
>>> EntryPoints().groups
187
199
set()
You can’t perform that action at this time.
0 commit comments