Summary
`_get_endpoint_prefix_to_name_mappings` in `awscli/customizations/configure/addmodel.py` (lines ~21-28) builds a dict manually with an empty-dict-then-loop-assignment pattern, where the loop body does nothing but a single key/value assignment.
Proposed change
Replace with a dict comprehension:
```python
return {
session.get_service_model(service_name).endpoint_prefix: service_name
for service_name in session.get_available_services()
}
```
Pure refactor, no behavior change.
Summary
`_get_endpoint_prefix_to_name_mappings` in `awscli/customizations/configure/addmodel.py` (lines ~21-28) builds a dict manually with an empty-dict-then-loop-assignment pattern, where the loop body does nothing but a single key/value assignment.
Proposed change
Replace with a dict comprehension:
```python
return {
session.get_service_model(service_name).endpoint_prefix: service_name
for service_name in session.get_available_services()
}
```
Pure refactor, no behavior change.