Skip to content

Commit

Permalink
Add one more pattern for JSON conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Aug 29, 2023
1 parent a82746e commit 998a517
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mypy_boto3_builder/parsers/shape_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,10 @@ def _parse_shape_string(self, shape: StringShape, output_child: bool) -> FakeAnn
return type_literal

pattern = shape.metadata.get("pattern", "")
if pattern == "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+":
if pattern in (
"[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
"^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$",
):
if output_child:
return Type.DictStrAny
else:
Expand Down

0 comments on commit 998a517

Please sign in to comment.