(cls)
return attrs
Collect protocol members from a protocol class objects.

    This includes names actually defined in the class dictionary, as well
    as names that appear in annotations. Special names (above) are skipped.
Collect protocol members from a protocol class objects.
Collect protocol members from a protocol class objects .
def _get_protocol_attrs(cls):
    """Collect protocol members from a protocol class objects.

    This includes names actually defined in the class dictionary, as well
    as names that appear in annotations. Special names (above) are skipped.
    """
    attrs = set()
    for base in cls.__mro__[:-1]:  # without object
        if base.__name__ in ('Protocol', 'Generic'):
            continue
        annotations = getattr(base, '__annotations__', {})
        for attr in list(base.__dict__.keys()) + list(annotations.keys()):
            if not attr.startswith('_abc_') and attr not in EXCLUDED_ATTRIBUTES:
                attrs.add(attr)
    return attrs
def _get_protocol_attrs ( cls ) : attrs = set ( ) for base in cls . __mro__ [ : - 1 ] : # without object if base . __name__ in ( 'Protocol' , 'Generic' ) : continue annotations = getattr ( base , '__annotations__' , { } ) for attr in list ( base . __dict__ . keys ( ) ) + list ( annotations . keys ( ) ) : if not attr . startswith ( '_abc_' ) and attr not in EXCLUDED_ATTRIBUTES : attrs . add ( attr ) return attrs