File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ def dict_to_struct(d: dict) -> structpb.Struct:
6363 return s
6464
6565
66- def __to_python_native (v : structpb .Value ) -> Any :
67- """Convert a protobuf Value to a Python native type."""
66+ def __to_python_builtin (v : structpb .Value ) -> Any :
67+ """Convert a protobuf Value to a Python builtin type."""
6868 if isinstance (v , structpb .ListValue ):
6969 return __listvalue_to_list (v )
7070 elif isinstance (v , structpb .Struct ):
@@ -74,7 +74,7 @@ def __to_python_native(v: structpb.Value) -> Any:
7474
7575def __listvalue_to_list (lv : structpb .ListValue ) -> list :
7676 """Convert a protobuf ListValue to a list."""
77- return [__to_python_native (v ) for v in lv ]
77+ return [__to_python_builtin (v ) for v in lv ]
7878
7979
8080def struct_to_dict (s : structpb .Struct ) -> dict :
@@ -84,7 +84,7 @@ def struct_to_dict(s: structpb.Struct) -> dict:
8484 protobuf struct. This function makes it possible to convert resources to a
8585 dictionary.
8686 """
87- return {k : __to_python_native (v ) for k , v in s .items ()}
87+ return {k : __to_python_builtin (v ) for k , v in s .items ()}
8888
8989
9090@dataclasses .dataclass
You can’t perform that action at this time.
0 commit comments