Skip to content

Commit eca72d5

Browse files
committed
fix: improve code quality for SonarCloud compliance
- Reverted to more maintainable loop-based approach for field copying - Ensures type safety while addressing SonarCloud code quality concerns - Maintains functionality for preserving examples when using model field - Addresses SonarCloud finding identified by dreamorosi
1 parent 830fbcd commit eca72d5

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

aws_lambda_powertools/event_handler/api_gateway.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,6 @@ def _get_openapi_path( # noqa PLR0912
682682

683683
# Preserve existing fields like examples, encoding, etc.
684684
new_payload: OpenAPIResponseContentSchema = {}
685-
# Copy all fields except 'model'
686685
for key, value in payload.items():
687686
if key != "model":
688687
new_payload[key] = value # type: ignore[literal-required]

0 commit comments

Comments
 (0)