Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/betterproto2_compiler/plugin/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
Union,
)

import betterproto2_compiler
import betterproto2

from betterproto2_compiler.compile.naming import (
pythonize_class_name,
pythonize_field_name,
Expand Down Expand Up @@ -182,7 +183,7 @@ class ProtoContentBase:
source_file: FileDescriptorProto
typing_compiler: TypingCompiler
path: List[int]
parent: Union["betterproto2_compiler.Message", "OutputTemplate"]
parent: Union["betterproto2.Message", "OutputTemplate"]

__dataclass_fields__: Dict[str, object]

Expand Down Expand Up @@ -420,7 +421,7 @@ def field_wraps(self) -> Optional[str]:
match_wrapper = re.match(r"\.google\.protobuf\.(.+)Value$", self.proto_obj.type_name)
if match_wrapper:
wrapped_type = "TYPE_" + match_wrapper.group(1).upper()
if hasattr(betterproto2_compiler, wrapped_type):
if hasattr(betterproto2, wrapped_type):
return f"betterproto2.{wrapped_type}"
return None

Expand Down
Loading