Skip to content

Commit

Permalink
Fix integration for AIO, fix attributes being parsed ans Response shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Apr 29, 2024
1 parent 67e947e commit ff0b828
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/aio_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U pip
poetry run pip install -U mypy ruff pyright aioboto3 boto3-stubs types-aiobotocore types-aioboto3
python -m pip install -U mypy ruff pyright aioboto3 boto3-stubs types-aiobotocore types-aioboto3
- name: Check output
run: |
poetry run python ./scripts/check_output.py -p ./mypy_boto3_output
python ./scripts/check_output.py -p ./mypy_boto3_output
2 changes: 1 addition & 1 deletion mypy_boto3_builder/parsers/parse_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def parse_attributes(
attribute_type = get_method_type_stub(service_name, resource_name, "_attributes", name)
if attribute_type is None:
attribute_shape = attribute[1]
attribute_type = shape_parser.parse_shape(attribute_shape, output=True)
attribute_type = shape_parser.parse_shape(attribute_shape, output_child=True)
result.append(Attribute(name, attribute_type))

return result
6 changes: 3 additions & 3 deletions mypy_boto3_builder/parsers/shape_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _parse_shape_structure(
),
attr_name in required,
)
if is_output_or_child:
if output:
self._mark_typed_dict_as_total(typed_dict)
self._add_response_metadata(typed_dict)

Expand Down Expand Up @@ -944,7 +944,7 @@ def fix_typed_dict_names(self) -> None:
new_typed_dict_name = self._get_non_clashing_typed_dict_name(typed_dict, "Output")
self._fixed_typed_dict_map[typed_dict] = output_typed_dict
self.logger.debug(
f"Fixing TypedDict name clash {old_typed_dict_name} -> {new_typed_dict_name}"
f"Fixing output TypedDict name clash {old_typed_dict_name} -> {new_typed_dict_name}"
)

self._output_typed_dict_map.rename(output_typed_dict, new_typed_dict_name)
Expand Down Expand Up @@ -976,7 +976,7 @@ def fix_typed_dict_names(self) -> None:
response_typed_dict, "Response"
)
self.logger.debug(
f"Fixing TypedDict name clash {old_typed_dict_name} -> {new_typed_dict_name}"
f"Fixing response TypedDict name clash {old_typed_dict_name} -> {new_typed_dict_name}"
)

self._response_typed_dict_map.rename(response_typed_dict, new_typed_dict_name)
Expand Down

0 comments on commit ff0b828

Please sign in to comment.