Return a boolean indicating whether the given callable `obj` has the `keywords` in its signature.
(obj: Callable, keywords: str | Sequence[str])
| 586 | |
| 587 | |
| 588 | def has_option(obj: Callable, keywords: str | Sequence[str]) -> bool: |
| 589 | """ |
| 590 | Return a boolean indicating whether the given callable `obj` has the `keywords` in its signature. |
| 591 | """ |
| 592 | if not callable(obj): |
| 593 | return False |
| 594 | sig = inspect.signature(obj) |
| 595 | return all(key in sig.parameters for key in ensure_tuple(keywords)) |
| 596 | |
| 597 | |
| 598 | def is_module_ver_at_least(module, version): |
no test coverage detected
searching dependent graphs…