pylint/checkers/utils.py
def decorated_with(func: astroid.FunctionDef, qnames: Iterable[str]) -> bool:
    """Determine if the `func` node has a decorator with the qualified name `qname`."""
    decorators = func.decorators.nodes if func.decorators else []
    for decorator_node in decorators:
        try:
            if any(
                i is not None and i.qname() in qnames for i in decorator_node.infer()
            ):
                return True
        except astroid.InferenceError:
            continue
    return False
def decorated_with(func: astroid.FunctionDef, qnames: Iterable[str]) -> bool:
    """Determine if the `func` node has a decorator with the qualified name `qname`."""
    decorators = func.decorators.nodes if func.decorators else []
    for decorator_node in decorators:
        try:
            if any(
                i is not None and i.qname() in qnames for i in decorator_node.infer()
            ):
                return True
        except astroid.InferenceError:
            continue
    return False
Determine if the `func` node has a decorator with the qualified name `qname`.