@classmethod
    def add_class_trait(cls, name, *trait):
        """Overrides HasTraits definition of *add_class_trait* to
        try to keep from clobbering framework stuff.
        """
        bases = [cls]
        bases.extend(cls.__bases__)
        for base in bases:
            if name in base.__dict__:
                raise NameError('Would override attribute %r of %s'
                                % (name, base.__name__))

        for t in trait:
            _check_bad_default(name, t)
            break  # just check the first arg in the list

        if name in cls._trait_metadata:
            del cls._trait_metadata[name]  # Invalidate.

        return super(Container, cls).add_class_trait(name, *trait)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/container.py/Container.add_class_trait/original