def __init__(cls, name, bases, namespace, **kwargs):
    super().__init__(name, bases, namespace, **kwargs)
    cls._rfm_dir = set()
    for base in (b for b in bases if hasattr(b, '_rfm_dir')):
        cls._rfm_dir.update(base._rfm_dir)
    used_attribute_names = set(cls._rfm_dir)
    variables.VarSpace(cls, used_attribute_names)
    used_attribute_names.update(cls._rfm_var_space.vars)
    parameters.ParamSpace(cls, used_attribute_names)
    cls._rfm_dir.update(cls.__dict__)
    for base in cls._rfm_bases:
        cls._rfm_hook_registry.update(base._rfm_hook_registry, denied_hooks=namespace)
    if ('_rfm_sanity' not in namespace):
        for base in cls._rfm_bases:
            if hasattr(base, '_rfm_sanity'):
                cls._rfm_sanity = getattr(base, '_rfm_sanity')
                if (cls._rfm_sanity.__name__ in namespace):
                    raise ReframeSyntaxError(f'{cls.__qualname__!r} overrides the candidate sanity function {cls._rfm_sanity.__qualname__!r} without defining an alternative')
                break
    for base in cls._rfm_bases:
        for (k, v) in base._rfm_perf_fns.items():
            if (k not in namespace):
                try:
                    cls._rfm_perf_fns[k] = v
                except KeyError:
                    'Performance function overridden by other class'
    cls._rfm_final_methods.update(*(b._rfm_final_methods for b in cls._rfm_bases))
    if getattr(cls, '_rfm_override_final', None):
        return
    for b in cls._rfm_bases:
        for key in b._rfm_final_methods:
            if ((key in namespace) and callable(namespace[key])):
                msg = f"'{cls.__qualname__}.{key}' attempts to override final method '{b.__qualname__}.{key}'; you should use the pipeline hooks instead"
                raise ReframeSyntaxError(msg)
def __init__(cls, name, bases, namespace, **kwargs):
    super().__init__(name, bases, namespace, **kwargs)
    cls._rfm_dir = set()
    for base in (b for b in bases if hasattr(b, '_rfm_dir')):
        cls._rfm_dir.update(base._rfm_dir)
    used_attribute_names = set(cls._rfm_dir)
    variables.VarSpace(cls, used_attribute_names)
    used_attribute_names.update(cls._rfm_var_space.vars)
    parameters.ParamSpace(cls, used_attribute_names)
    cls._rfm_dir.update(cls.__dict__)
    for base in cls._rfm_bases:
        cls._rfm_hook_registry.update(base._rfm_hook_registry, denied_hooks=namespace)
    if ('_rfm_sanity' not in namespace):
        for base in cls._rfm_bases:
            if hasattr(base, '_rfm_sanity'):
                cls._rfm_sanity = getattr(base, '_rfm_sanity')
                if (cls._rfm_sanity.__name__ in namespace):
                    raise ReframeSyntaxError(f'{cls.__qualname__!r} overrides the candidate sanity function {cls._rfm_sanity.__qualname__!r} without defining an alternative')
                break
    for base in cls._rfm_bases:
        for (k, v) in base._rfm_perf_fns.items():
            if (k not in namespace):
                try:
                    cls._rfm_perf_fns[k] = v
                except KeyError:
                    'Performance function overridden by other class'
    cls._rfm_final_methods.update(*(b._rfm_final_methods for b in cls._rfm_bases))
    if getattr(cls, '_rfm_override_final', None):
        return
    for b in cls._rfm_bases:
        for key in b._rfm_final_methods:
            if ((key in namespace) and callable(namespace[key])):
                msg = f"'{cls.__qualname__}.{key}' attempts to override final method '{b.__qualname__}.{key}'; you should use the pipeline hooks instead"
                raise ReframeSyntaxError(msg)