Skip to content

Commit e35adde

Browse files
committed
Format and fix yaml_writer test.
1 parent a5bd5b0 commit e35adde

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

aws_doc_sdk_examples_tools/lliam/entry_points/lliam_app.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ def dedupe_reservoir(
9393
"""
9494
doc_gen_root = Path(iam_tributary_root)
9595
package_names = parse_package_names(packages)
96-
cmd = commands.DedupeReservoir(
97-
root=doc_gen_root, packages=package_names
98-
)
96+
cmd = commands.DedupeReservoir(root=doc_gen_root, packages=package_names)
9997
errors = messagebus.handle(cmd)
10098
handle_domain_errors(errors)
10199

aws_doc_sdk_examples_tools/yaml_writer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from argparse import ArgumentParser
22
from collections import defaultdict
33
from dataclasses import asdict
4-
from difflib import unified_diff
54
from pathlib import Path
65
from typing import Any, DefaultDict, Dict, List, Tuple
76

@@ -146,7 +145,7 @@ def report_yaml_differences(
146145
elif file_path not in after_values:
147146
differences.append((file_path, "removed"))
148147
else:
149-
diff = unified_diff(before, after)
148+
diff = f"{before}\n\n---\n\n{after}"
150149
differences.append((file_path, diff))
151150

152151
return differences

aws_doc_sdk_examples_tools/yaml_writer_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ def test_report_yaml_differences_with_changes():
7272
differences.sort()
7373

7474
expected = [
75-
("file1.yaml", "modified"),
75+
("file1.yaml", "{'key1': 'value1'}\n\n---\n\n{'key1': 'changed_value'}"),
7676
("file2.yaml", "removed"),
7777
("file4.yaml", "added"),
7878
]
7979
expected.sort()
80-
8180
assert differences == expected
8281

8382

0 commit comments

Comments
 (0)