pylint/pyreverse/vcgutils.py
def _write_attributes(self, attributes_dict, **args):
        """write graph, node or edge attributes
        """
        for key, value in args.items():
            try:
                _type = attributes_dict[key]
            except KeyError:
                raise Exception(
                    """no such attribute %s
possible attributes are %s"""
                    % (key, attributes_dict.keys())
                )

            if not _type:
                self._stream.write('%s%s:"%s"\n' % (self._indent, key, value))
            elif _type == 1:
                self._stream.write("%s%s:%s\n" % (self._indent, key, int(value)))
            elif value in _type:
                self._stream.write("%s%s:%s\n" % (self._indent, key, value))
            else:
                raise Exception(
                    """value %s isn\'t correct for attribute %s
correct values are %s"""
                    % (value, key, _type)
                )
def _write_attributes(self, attributes_dict, **args):
        """write graph, node or edge attributes
        """
        for key, value in args.items():
            try:
                _type = attributes_dict[key]
            except KeyError:
                raise Exception(
                    """no such attribute %s
possible attributes are %s"""
                    % (key, attributes_dict.keys())
                )

            if not _type:
                self._stream.write('%s%s:"%s"\n' % (self._indent, key, value))
            elif _type == 1:
                self._stream.write("%s%s:%s\n" % (self._indent, key, int(value)))
            elif value in _type:
                self._stream.write("%s%s:%s\n" % (self._indent, key, value))
            else:
                raise Exception(
                    """value %s isn\'t correct for attribute %s
correct values are %s"""
                    % (value, key, _type)
                )
write graph, node or edge attributes