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
4 changes: 2 additions & 2 deletions src/betterproto2_compiler/compile/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def get_type_reference(
compiling_google_protobuf = current_package == ["google", "protobuf"]
importing_google_protobuf = py_package == ["google", "protobuf"]
if importing_google_protobuf and not compiling_google_protobuf:
py_package = ["betterproto", "lib"] + (["pydantic"] if pydantic else []) + py_package
py_package = ["betterproto2", "lib"] + (["pydantic"] if pydantic else []) + py_package

if py_package[:1] == ["betterproto"]:
if py_package[:1] == ["betterproto2"]:
return reference_absolute(imports, py_package, py_type)

if py_package == current_package:
Expand Down
Loading