[docs]classMatcher(tp.Generic[T],ABC):"""Defines the core requirements for any matcher. - Must be comparable for equality with anything. - Must have a sensible representation. """@abstractmethoddef__eq__(self,other:tp.Any)->bool:...@abstractmethoddef__repr__(self)->str:...
MaybeMatcher:TypeAlias=tp.Union[T,Matcher[T]]"""Either ``T`` or a matcher of ``T``."""