MCPcopy Index your code
hub / github.com/python/cpython / _disallow_dist

Method _disallow_dist

Lib/importlib/metadata/__init__.py:280–293  ·  view source on GitHub ↗

Querying by dist is not allowed (dist objects are not comparable). >>> EntryPoint(name='fan', value='fav', group='fag').matches(dist='foo') Traceback (most recent call last): ... ValueError: "dist" is not suitable for matching...

(params)

Source from the content-addressed store, hash-verified

278
279 @staticmethod
280 def _disallow_dist(params):
281 """
282 Querying by dist is not allowed (dist objects are not comparable).
283 >>> EntryPoint(name='fan', value='fav', group='fag').matches(dist='foo')
284 Traceback (most recent call last):
285 ...
286 ValueError: "dist" is not suitable for matching...
287 """
288 if "dist" in params:
289 raise ValueError(
290 '"dist" is not suitable for matching. '
291 "Instead, use Distribution.entry_points.select() on a "
292 "located distribution."
293 )
294
295 def _key(self):
296 return self.name, self.value, self.group

Callers 1

matchesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected