def _determine_remaining()

in chalice/deploy/sweeper.py [0:0]


    def _determine_remaining(self, deployed):
        # type: (DeployedResources) -> List[str]
        remaining = []
        deployed_resource_names = reversed(deployed.resource_names())

        for name in deployed_resource_names:
            resource_values = deployed.resource_values(name)
            if name not in self.marked:
                remaining.append(name)
            elif resource_values['resource_type'] in self.specific_resources:
                method = '_determine_%s' % resource_values['resource_type']
                handler = getattr(self, method)
                resource_name = handler(name, resource_values)
                if resource_name:
                    if isinstance(resource_name, list):
                        remaining.extend(resource_name)
                    else:
                        remaining.append(resource_name)
        return remaining