Skip to content

Commit 8c55a6d

Browse files
committed
Reduce indentation in field parsing
1 parent e3fea00 commit 8c55a6d

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/mkdocstrings_handlers/zig/_internal/zig_docs_extractor.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,18 @@ def _parse_structure(self, node: Node) -> dict:
3636
module_doc.append(text[3:].strip())
3737
elif child.type == "container_field":
3838
field = self._parse_field(child)
39-
if field:
40-
if not fields:
41-
children.append(
42-
{
43-
"node_type": "fields",
44-
"children": fields,
45-
},
46-
)
47-
48-
fields.append(field)
39+
if not field:
40+
continue
41+
42+
if not fields:
43+
children.append(
44+
{
45+
"node_type": "fields",
46+
"children": fields,
47+
},
48+
)
49+
50+
fields.append(field)
4951
elif child.type == "function_declaration":
5052
function = self._parse_function(child)
5153
if function:

0 commit comments

Comments
 (0)