Skip to content

Commit 949d565

Browse files
fix(event-handler): fix ruff lint violations in middlewares/openapi_validation.py comments
Update inline comments to use modern Python 3.10+ syntax: - List[Model] -> list[Model] - Optional[List[Model]] -> list[Model] | None - Optional[RootModel[List[Model]]] -> RootModel[list[Model]] | None Part of #8088 Signed-off-by: hirenkumar-n-dholariya <hirenkumarnd@gmail.com>
1 parent d785236 commit 949d565

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

aws_lambda_powertools/event_handler/middlewares/openapi_validation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,11 @@ def _is_or_contains_sequence(annotation: Any) -> bool:
505505
506506
This function handles complex type annotations like:
507507
- List[Model] - direct sequence
508-
- Union[Model, List[Model]] - checks if any Union member is a sequence
509-
- Optional[List[Model]] - Union[List[Model], None]
510-
- RootModel[List[Model]] - checks if the RootModel wraps a sequence
511-
- Optional[RootModel[List[Model]]] - Union member that is a RootModel
512-
- RootModel[Union[Model, List[Model]]] - RootModel wrapping a Union with a sequence
508+
- Union[Model, list[Model]] - checks if any Union member is a sequence
509+
- list[Model] | None - Union[list[Model], None]
510+
- RootModel[list[Model]] - checks if the RootModel wraps a sequence
511+
- RootModel[list[Model]] | None - Union member that is a RootModel
512+
- RootModel[Union[Model, list[Model]]] - RootModel wrapping a Union with a sequence
513513
"""
514514
# Direct sequence check
515515
if field_annotation_is_sequence(annotation):

0 commit comments

Comments
 (0)