Skip to content

Commit

Permalink
Merge pull request #20 from awsdocs/bug/set-should-be-list
Browse files Browse the repository at this point in the history
Change set back to list because it stores Example, which is unhashable.
  • Loading branch information
Laren-AWS authored Apr 10, 2024
2 parents 07f27ec + bf36ba6 commit c6b5dc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws_doc_sdk_examples_tools/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,11 @@ def validate_no_duplicate_api_examples(
examples: Iterable[Example], errors: MetadataErrors
):
"""Call this on a full set of examples to verify that there are no duplicate API examples."""
svc_action_map = defaultdict(set)
svc_action_map: Dict[str, List] = defaultdict(list)
for example in [ex for ex in examples if ex.category == "Api"]:
for service, actions in example.services.items():
for action in actions:
svc_action_map[f"{service}:{action}"].add(example)
svc_action_map[f"{service}:{action}"].append(example)
for svc_action, ex_items in svc_action_map.items():
if len(ex_items) > 1:
errors.append(
Expand Down

0 comments on commit c6b5dc6

Please sign in to comment.