Esempio n. 1
0
def parse_aws_limits_generic(info):
    limits_by_region: AWSLimitsByRegion = {}
    for line in parse_aws(info):
        # FIXME: according to the type hints, "line" is Mapping[str, Any]
        limits_by_region.setdefault(line[-1], []).append(
            line[:-1] + [lambda x: "%s" % x])  # type: ignore
    return limits_by_region
Esempio n. 2
0
def parse_aws_limits_generic(info):
    limits_by_region: AWSLimitsByRegion = {}
    for line in parse_aws(info):
        limits_by_region.setdefault(line[-1], []).append(line[:-1] +
                                                         [lambda x: "%s" % x])
    return limits_by_region
Esempio n. 3
0
def test_parse_aws(string_table, expected_result):
    assert parse_aws(string_table) == expected_result