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)
| 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 |