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

Commit 62f05e0

Browse files
committed
Add missing file
1 parent 733420b commit 62f05e0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import typing
2+
3+
from betterproto2_compiler.lib.google.protobuf import (
4+
BoolValue as VanillaBoolValue,
5+
StringValue as VanillaStringValue,
6+
)
7+
8+
9+
class BoolValue(VanillaBoolValue):
10+
@staticmethod
11+
def from_wrapped(wrapped: bool) -> typing.Self:
12+
return BoolValue(value=wrapped)
13+
14+
def to_wrapped(self) -> bool:
15+
return self.value
16+
17+
18+
class StringValue(VanillaStringValue):
19+
@staticmethod
20+
def from_wrapped(wrapped: str) -> typing.Self:
21+
return StringValue(value=wrapped)
22+
23+
def to_wrapped(self) -> str:
24+
return self.value

0 commit comments

Comments
 (0)