Skip to content

Commit 5447c8e

Browse files
committed
Ran Black for some very important formatting updates.
1 parent 1f78d49 commit 5447c8e

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

aws_doc_sdk_examples_tools/metadata_errors.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ def prefix(self):
102102
return prefix
103103

104104
def message(self) -> str:
105-
return (f"incorrect YAML format {self.parser_error}.\n"
106-
f"\tThis indicates a problem with the YAML itself. Use a YAML authoring tool to help diagnose further.")
105+
return (
106+
f"incorrect YAML format {self.parser_error}.\n"
107+
f"\tThis indicates a problem with the YAML itself. Use a YAML authoring tool to help diagnose further."
108+
)
107109

108110

109111
@dataclass
@@ -347,8 +349,10 @@ class UnknownService(MetadataParseError):
347349
service: str = ""
348350

349351
def message(self):
350-
return (f"has unknown service '{self.service}'. Typically this indicates a typo in the name of the service, "
351-
f"which must match a key used in services.yaml.")
352+
return (
353+
f"has unknown service '{self.service}'. Typically this indicates a typo in the name of the service, "
354+
f"which must match a key used in services.yaml."
355+
)
352356

353357

354358
@dataclass
@@ -399,8 +403,10 @@ class PersonMissingField(SdkVersionError):
399403
alias: str = ""
400404

401405
def message(self):
402-
return (f"person is missing a field: name: {self.name}, alias: {self.alias}. A person must have both a name "
403-
f"and an alias.")
406+
return (
407+
f"person is missing a field: name: {self.name}, alias: {self.alias}. A person must have both a name "
408+
f"and an alias."
409+
)
404410

405411

406412
@dataclass

aws_doc_sdk_examples_tools/snippets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ class MissingSnippetFile(MetadataError):
261261
snippet_file: Optional[str] = None
262262

263263
def message(self):
264-
return (f"missing snippet_file {self.snippet_file}. The relative path to the snippet_file listed in the "
265-
f"metadata for this example must map to an actual file in the file system.")
264+
return (
265+
f"missing snippet_file {self.snippet_file}. The relative path to the snippet_file listed in the "
266+
f"metadata for this example must map to an actual file in the file system."
267+
)
266268

267269

268270
@dataclass

aws_doc_sdk_examples_tools/yaml_mapper.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
from .metadata_validator import StringExtension
1919

2020

21-
CATEGORY_REQUIRED_FIELDS = {
22-
"IAMPolicy": {
23-
"version": {"authors", "owner", "source"}
24-
}
25-
}
21+
CATEGORY_REQUIRED_FIELDS = {"IAMPolicy": {"version": {"authors", "owner", "source"}}}
2622

2723

2824
def example_from_yaml(

aws_doc_sdk_examples_tools/yaml_writer_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ def test_doc_gen(sample_doc_gen: DocGen):
1818
writes = prepare_write(sample_doc_gen.examples)
1919
assert writes
2020

21-
writes = {Path(k.replace(str(ROOT), "")).as_posix().lstrip("/"): v for k, v in writes.items()}
21+
writes = {
22+
Path(k.replace(str(ROOT), "")).as_posix().lstrip("/"): v
23+
for k, v in writes.items()
24+
}
2225

2326
expected_writes = {
2427
".doc_gen/metadata/aws_entity_metadata.yaml": """sns_EntitySuccesses:

0 commit comments

Comments
 (0)