

def validate(self, require_all=True, scale='colors'):
    'Validate the visualization contents.\n\n        Parameters\n        ----------\n        require_all : boolean, default True\n            If True (default), then all fields ``data``, ``scales``,\n            ``axes``, and ``marks`` must be defined. The user is allowed to\n            disable this if the intent is to define the elements\n            client-side.\n\n        If the contents of the visualization are not valid Vega, then a\n        :class:`ValidationError` is raised.\n        '
    super(self.__class__, self).validate()
    required_attribs = ('data', 'scales', 'axes', 'marks')
    for elem in required_attribs:
        attr = getattr(names, elem)
        if attr:
            for entry in attr:
                entry.validate()
            names = [a.name for a in attr]
            if (len(names) != len(set(names))):
                raise ValidationError((elem + ' has duplicate names'))
        elif require_all:
            raise ValidationError((elem + ' must be defined for valid visualization'))

dataset/ETHPy150Open wrobstory/vincent/vincent/visualization.py Visualization.validate/VarMisuse@56/240 `self`->`names`