Skip to content

Commit 69b1a97

Browse files
chore: rename internal functions
Signed-off-by: Jesús Fernández <[email protected]>
1 parent 3edff20 commit 69b1a97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crossplane/function/resource.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

7575
def __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

8080
def 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

0 commit comments

Comments
 (0)