Skip to content

Commit d31f90b

Browse files
Combine circular imports
1 parent 919b0a6 commit d31f90b

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

betterproto/__init__.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,19 @@ def which_one_of(message: Message, group_name: str) -> Tuple[str, Any]:
942942

943943

944944
# Circular import workaround: google.protobuf depends on base classes defined above.
945-
from .lib.google.protobuf import Duration, Timestamp
945+
from .lib.google.protobuf import (
946+
Duration,
947+
Timestamp,
948+
BoolValue,
949+
BytesValue,
950+
DoubleValue,
951+
FloatValue,
952+
Int32Value,
953+
Int64Value,
954+
StringValue,
955+
UInt32Value,
956+
UInt64Value,
957+
)
946958

947959

948960
class _Duration(Duration):
@@ -1092,16 +1104,3 @@ async def _unary_stream(
10921104
await stream.send_message(request, end=True)
10931105
async for message in stream:
10941106
yield message
1095-
1096-
1097-
from .lib.google.protobuf import (
1098-
BoolValue,
1099-
BytesValue,
1100-
DoubleValue,
1101-
FloatValue,
1102-
Int32Value,
1103-
Int64Value,
1104-
StringValue,
1105-
UInt32Value,
1106-
UInt64Value,
1107-
)

0 commit comments

Comments
 (0)