def fn_predicate()

in bindings/python/stub.py [0:0]


def fn_predicate(obj):
    value = inspect.ismethoddescriptor(obj) or inspect.isbuiltin(obj)
    if value:
        return (
            obj.__doc__
            and obj.__text_signature__
            and (not obj.__name__.startswith("_") or obj.__name__ in {"__enter__", "__exit__"})
        )
    if inspect.isgetsetdescriptor(obj):
        return obj.__doc__ and not obj.__name__.startswith("_")
    return False