(self, config)
Remove all adapters for for the given config
Remove all adapters for for the given config
Remove all adapters for for the given config
def _remove_adapters_for_data_source(self, config):
        """Remove all adapters for for the given config"""

        def _filter_adapters(adapters):
            return [
                adapter for adapter in adapters
                if adapter.config.get_id != config.get_id
            ]

        self.adapters = _filter_adapters(self.adapters)

        # iterate over all domains in case the list of domains for the data source has changed
        for domain in list(self.adapters_by_domain):
            filtered_adapters = _filter_adapters(self.adapters_by_domain[domain])
            if filtered_adapters:
                self.adapters_by_domain[domain] = filtered_adapters
            else:
                del self.adapters_by_domain[domain]
def _remove_adapters_for_data_source ( self , config ) : def _filter_adapters ( adapters ) : return [ adapter for adapter in adapters if adapter . config . get_id != config . get_id ] self . adapters = _filter_adapters ( self . adapters ) # iterate over all domains in case the list of domains for the data source has changed for domain in list ( self . adapters_by_domain ) : filtered_adapters = _filter_adapters ( self . adapters_by_domain [ domain ] ) if filtered_adapters : self . adapters_by_domain [ domain ] = filtered_adapters else : del self . adapters_by_domain [ domain ]