Skip to content

Commit 89597e2

Browse files
shashankrnr32Shashank Sharma
authored and
Shashank Sharma
committed
fix: Fix pydantic type documentation for List/Set/Tuple
Change `prop.type_` to `prop.outer_type_` to get the correct type of the pydantic field when using List/Set/Tuple/Union Optional[Type] does not work because of pydantic's internal implementation to change outer_type Fixes #94
1 parent bf04764 commit 89597e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pytkdocs/loader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ def get_pydantic_field_documentation(node: ObjectNode) -> Attribute:
679679
path=path,
680680
file_path=node.file_path,
681681
docstring=prop.field_info.description,
682-
attr_type=prop.type_,
682+
attr_type=prop.outer_type_,
683683
properties=properties,
684684
)
685685

0 commit comments

Comments
 (0)