Skip to content

Commit 1d0e17d

Browse files
apply formatter diff
1 parent 8d45690 commit 1d0e17d

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

libc/utils/docgen/docgen.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def check_api(header: Header, api: Dict):
7070
macros = api["macros"]
7171

7272
for name, obj in macros.items():
73-
if (not any(k in obj.keys() for k in possible_keys)):
74-
err = f'error: Macro {name} does not contain at least one required property: {possible_keys}'
73+
if not any(k in obj.keys() for k in possible_keys):
74+
err = f"error: Macro {name} does not contain at least one required property: {possible_keys}"
7575
errors.append(err)
7676

7777
# Validate functions
@@ -84,8 +84,8 @@ def check_api(header: Header, api: Dict):
8484

8585
fns = api["functions"]
8686
for name, obj in fns.items():
87-
if (not any(k in obj.keys() for k in possible_keys)):
88-
err = f'error: function {name} does not contain at least one required property: {possible_keys}'
87+
if not any(k in obj.keys() for k in possible_keys):
88+
err = f"error: function {name} does not contain at least one required property: {possible_keys}"
8989
errors.append(err)
9090

9191
if errors:
@@ -133,9 +133,13 @@ def print_functions_rst(header: Header, functions: Dict):
133133
print(" -")
134134

135135
if "in-latest-posix" in functions[name]:
136-
print(f' - `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/{name}.html>`__')
136+
print(
137+
f" - `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/{name}.html>`__"
138+
)
137139
elif "removed-in-posix-2008" in functions[name]:
138-
print(f' - `removed in POSIX.1-2008 <https://pubs.opengroup.org/onlinepubs/007904875/functions/{name}.html>`__')
140+
print(
141+
f" - `removed in POSIX.1-2008 <https://pubs.opengroup.org/onlinepubs/007904875/functions/{name}.html>`__"
142+
)
139143
else:
140144
print(" -")
141145

@@ -161,7 +165,9 @@ def print_macros_rst(header: Header, macros: Dict):
161165
print(" -")
162166

163167
if "in-latest-posix" in macros[name]:
164-
print(f' - `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/{header.name}.html>`__')
168+
print(
169+
f" - `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/{header.name}.html>`__"
170+
)
165171
else:
166172
print(" -")
167173
print()

0 commit comments

Comments
 (0)