EntryPoint matches the given parameters. >>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]') >>> ep.matches(group='foo') True >>> ep.matches(name='bar', value='bing:bong [extra1, extra2]') True >>> ep.matches(grou
(self, **params)
| 253 | return self |
| 254 | |
| 255 | def matches(self, **params): |
| 256 | """ |
| 257 | EntryPoint matches the given parameters. |
| 258 | |
| 259 | >>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]') |
| 260 | >>> ep.matches(group='foo') |
| 261 | True |
| 262 | >>> ep.matches(name='bar', value='bing:bong [extra1, extra2]') |
| 263 | True |
| 264 | >>> ep.matches(group='foo', name='other') |
| 265 | False |
| 266 | >>> ep.matches() |
| 267 | True |
| 268 | >>> ep.matches(extras=['extra1', 'extra2']) |
| 269 | True |
| 270 | >>> ep.matches(module='bing') |
| 271 | True |
| 272 | >>> ep.matches(attr='bong') |
| 273 | True |
| 274 | """ |
| 275 | self._disallow_dist(params) |
| 276 | attrs = (getattr(self, param) for param in params) |
| 277 | return all(map(operator.eq, params.values(), attrs)) |
| 278 | |
| 279 | @staticmethod |
| 280 | def _disallow_dist(params): |
no test coverage detected