"""
This type stub file was generated by pyright.
"""

"""String dispatch class to match regexps and dispatch commands.
"""
class StrDispatch:
    """Dispatch (lookup) a set of strings / regexps for match.

    Example:

    >>> dis = StrDispatch()
    >>> dis.add_s('hei',34, priority = 4)
    >>> dis.add_s('hei',123, priority = 2)
    >>> dis.add_re('h.i', 686)
    >>> print(list(dis.flat_matches('hei')))
    [123, 34, 686]
    """
    def __init__(self) -> None:
        ...
    
    def add_s(self, s, obj, priority=...): # -> None:
        """ Adds a target 'string' for dispatching """
        ...
    
    def add_re(self, regex, obj, priority=...): # -> None:
        """ Adds a target regexp for dispatching """
        ...
    
    def dispatch(self, key):
        """ Get a seq of Commandchain objects that match key """
        ...
    
    def __repr__(self):
        ...
    
    def s_matches(self, key):
        ...
    
    def flat_matches(self, key):
        """ Yield all 'value' targets, without priority """
        ...
    


