Skip to content

Commit b0a2da7

Browse files
committed
Very Important Reformat.
1 parent 874a5eb commit b0a2da7

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

aws_doc_sdk_examples_tools/metadata_errors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,9 @@ def message(self) -> str:
401401
return f"conflict from {self.other_file}: example already exists for this language and SDK version"
402402

403403

404-
def check_mapping(mapping: str | None, field: str, strict: bool = True) -> str | MetadataParseError:
404+
def check_mapping(
405+
mapping: str | None, field: str, strict: bool = True
406+
) -> str | MetadataParseError:
405407
if not mapping:
406408
return MissingField(field=field)
407409
if strict and not re.match("&[-_a-zA-Z0-9]+;", mapping):

aws_doc_sdk_examples_tools/sdks.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def validate(self, errors: MetadataErrors):
141141
errors.append(SdkWithNoVersionsError(id=self.name))
142142

143143
@classmethod
144-
def from_yaml(cls, name: str, yaml: Dict[str, Any], strict: bool) -> tuple[Sdk, MetadataErrors]:
144+
def from_yaml(
145+
cls, name: str, yaml: Dict[str, Any], strict: bool
146+
) -> tuple[Sdk, MetadataErrors]:
145147
errors = MetadataErrors()
146148
property = yaml.get("property", "")
147149
guide = check_mapping(yaml.get("guide"), "guide")
@@ -162,7 +164,9 @@ def from_yaml(cls, name: str, yaml: Dict[str, Any], strict: bool) -> tuple[Sdk,
162164
return cls(name=name, versions=versions, guide=guide, property=property), errors
163165

164166

165-
def parse(file: Path, yaml: Dict[str, Any], strict: bool = True) -> tuple[Dict[str, Sdk], MetadataErrors]:
167+
def parse(
168+
file: Path, yaml: Dict[str, Any], strict: bool = True
169+
) -> tuple[Dict[str, Sdk], MetadataErrors]:
166170
sdks: Dict[str, Sdk] = {}
167171
errors = MetadataErrors()
168172

aws_doc_sdk_examples_tools/sdks_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
)
2121

2222

23-
def load(path: str, strict: bool = True) -> Tuple[Dict[str, Sdk], metadata_errors.MetadataErrors]:
23+
def load(
24+
path: str, strict: bool = True
25+
) -> Tuple[Dict[str, Sdk], metadata_errors.MetadataErrors]:
2426
root = Path(__file__).parent
2527
filename = root / "test_resources" / path
2628
with open(filename) as file:

aws_doc_sdk_examples_tools/validate.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ def main():
4444
doc_gen = DocGen.default()
4545
doc_gen.merge(
4646
DocGen.from_root(
47-
root=root_path, validation=ValidationConfig(strict_titles=args.strict_titles), config=config_path
47+
root=root_path,
48+
validation=ValidationConfig(strict_titles=args.strict_titles),
49+
config=config_path,
4850
)
4951
)
5052
doc_gen.root = root_path
5153
else:
5254
doc_gen = DocGen.from_root(
53-
root=root_path, validation=ValidationConfig(strict_titles=args.strict_titles), config=args.config
55+
root=root_path,
56+
validation=ValidationConfig(strict_titles=args.strict_titles),
57+
config=args.config,
5458
)
5559

5660
doc_gen.collect_snippets(snippets_root=root_path)

0 commit comments

Comments
 (0)