domains / / boto/boto3
Avoid identifier name stuttering
Do not repeat the resource name in identifier names. This form of stuttering makes code less readable and inconsistent. Instead, use simple, descriptive identifiers without redundancy.
Do not repeat the resource name in identifier names. This form of stuttering makes code less readable and inconsistent. Instead, use simple, descriptive identifiers without redundancy.
For example:
- Use
Idinstead ofVpnGatewayIdfor a VpnGateway resource - Use
Nameinstead ofReportNamefor a ReportDefinition resource
When necessary, include a memberName attribute to map the simplified identifier to the actual API field name:
"identifiers": [
{
"name": "Id",
"memberName": "VpnGatewayId"
}
]
This approach creates more concise and consistent identifiers throughout the codebase while maintaining the correct mapping to external API representations.