API Types: treat '_*' as private fields and dont inspect them

This commit is contained in:
Johannes Kirschbauer
2024-07-06 16:17:44 +02:00
parent d8ff8b042f
commit cb13ddb464

View File

@@ -76,6 +76,7 @@ def type_to_dict(t: Any, scope: str = "", type_map: dict[TypeVar, type] = {}) ->
properties = {
f.name: type_to_dict(f.type, f"{scope} {t.__name__}.{f.name}", type_map)
for f in fields
if not f.name.startswith("_")
}
required = set()