Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 9798508

Browse files
committed
Fix compilation
1 parent ee6e9a1 commit 9798508

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/betterproto2_compiler/plugin/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
Union,
4747
)
4848

49-
import betterproto2_compiler
49+
import betterproto2
5050
from betterproto2_compiler.compile.naming import (
5151
pythonize_class_name,
5252
pythonize_field_name,
@@ -182,7 +182,7 @@ class ProtoContentBase:
182182
source_file: FileDescriptorProto
183183
typing_compiler: TypingCompiler
184184
path: List[int]
185-
parent: Union["betterproto2_compiler.Message", "OutputTemplate"]
185+
parent: Union["betterproto2.Message", "OutputTemplate"]
186186

187187
__dataclass_fields__: Dict[str, object]
188188

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

0 commit comments

Comments
 (0)