Skip to content

Commit 8fb86d6

Browse files
committed
fix: Serialize yields and keyword arguments sections
1 parent fb0a62d commit 8fb86d6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/pytkdocs/serializer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,14 @@ def serialize_docstring_section(section: Section) -> dict: # noqa: WPS231 (not
180180
serialized.update({"value": section.value}) # type: ignore
181181
elif section.type == section.Type.RETURN:
182182
serialized.update({"value": serialize_annotated_object(section.value)}) # type: ignore
183+
elif section.type == section.Type.YIELD:
184+
serialized.update({"value": serialize_annotated_object(section.value)}) # type: ignore
183185
elif section.type == section.Type.EXCEPTIONS:
184186
serialized.update({"value": [serialize_annotated_object(exc) for exc in section.value]}) # type: ignore
185187
elif section.type == section.Type.PARAMETERS:
186188
serialized.update({"value": [serialize_parameter(param) for param in section.value]}) # type: ignore
189+
elif section.type == section.Type.KEYWORD_ARGS:
190+
serialized.update({"value": [serialize_parameter(param) for param in section.value]}) # type: ignore
187191
elif section.type == section.Type.ATTRIBUTES:
188192
serialized.update({"value": [serialize_attribute(attr) for attr in section.value]}) # type: ignore
189193
elif section.type == section.Type.EXAMPLES:

0 commit comments

Comments
 (0)