def updateVistrail(self):
        """ updateVistrail() -> None
        Update Vistrail to contain changes in the port table

        """
        from vistrails.core.modules.basic_modules import StringFormat
        args, kwargs = StringFormat.list_placeholders(self.get_format())
        wanted_ports = set('_%d' % n for n in xrange(args)) | kwargs

        current_ports = set(port_spec.name
                            for port_spec in self.module.input_port_specs)

        sigstring = '(org.vistrails.vistrails.basic:Variant)'
        add_ports = [('input', n, sigstring, -1)
                     for n in (wanted_ports - current_ports)]
        delete_ports = [('input', n)
                        for n in (current_ports - wanted_ports)]

        self.controller.update_ports(self.module.id, delete_ports, add_ports)

        return True
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/modules/stringformat_configuration.py/StringFormatConfigurationWidget.updateVistrail/original