def _get_all_stacks()

in iact3/cli_modules/list.py [0:0]


    def _get_all_stacks(cls, stacks):
        all_stacks = []
        longest_project_name = ''
        longest_test_name = ''
        longest_stack_name = ''
        for region_stacks in stacks:
            for stack in region_stacks:
                stack_name = stack['StackName']
                if len(stack_name) > len(longest_stack_name):
                    longest_stack_name = stack_name
                tags = stack['Tags']
                for tag in tags:
                    if tag['Key'] == f'{IAC_NAME}-test-name':
                        test_name = tag['Value']
                        if len(test_name) > len(longest_test_name):
                            longest_test_name = test_name
                        stack['TestName'] = test_name
                    elif tag['Key'] == f'{IAC_NAME}-project-name':
                        project_name = tag['Value']
                        if len(project_name) > len(longest_project_name):
                            longest_project_name = project_name
                        stack['ProjectName'] = project_name
                    elif tag['Key'] == f'{IAC_NAME}-id':
                        stack['TestId'] = tag['Value']
                all_stacks.append(stack)

        return all_stacks, len(longest_project_name), len(longest_test_name), len(longest_stack_name)