Skip to content

Commit

Permalink
Yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesEbke committed Jan 21, 2021
1 parent 173a70b commit 80c4c8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
7 changes: 1 addition & 6 deletions aws_list_all/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,7 @@ def main():
action='append',
help='Only list discovered operations of the given service (can be specified multiple times)'
)
ops.add_argument(
'-r',
'--region',
default='us-east-1',
help='Region to use to query for listing operations'
)
ops.add_argument('-r', '--region', default='us-east-1', help='Region to use to query for listing operations')
introspecters.add_parser('debug', description='Debug information', help='Debug information')

# Finally, refreshing the service/region caches comes last.
Expand Down
8 changes: 5 additions & 3 deletions aws_list_all/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,11 @@ def get_endpoint_hosts():
# This means that the endpoint_url itself may not point to any host, defeating our heuristic.
# Therefore, we only pick the base URL if at least one operation accesses it, otherwise we pick the
# alphabetically first host prefix.
endpoint_prefixes = set(meta.service_model.operation_model(op_name).endpoint.get('hostPrefix')
for op_name in meta.service_model.operation_names
if meta.service_model.operation_model(op_name).endpoint)
endpoint_prefixes = set(
meta.service_model.operation_model(op_name).endpoint.get('hostPrefix')
for op_name in meta.service_model.operation_names
if meta.service_model.operation_model(op_name).endpoint
)
if None in endpoint_prefixes or not endpoint_prefixes:
result[service][region] = meta.endpoint_url
else:
Expand Down
1 change: 0 additions & 1 deletion aws_list_all/test_introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def test_get_listing_operations():
'amplifybackend',
'sagemaker-featurestore-runtime',
'sagemaker-edge',

}

services_with_no_listings = set()
Expand Down

0 comments on commit 80c4c8c

Please sign in to comment.