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

Commit 4a4c4d9

Browse files
committed
Remove try_value for enums
1 parent caa519f commit 4a4c4d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/betterproto2_compiler/plugin/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def betterproto_field_args(self) -> list[str]:
320320
elif self.repeated:
321321
args.append("repeated=True")
322322
elif self.field_type == FieldType.TYPE_ENUM:
323-
args.append(f"default_factory=lambda: {self.py_type}.try_value(0)")
323+
args.append(f"default_factory=lambda: {self.py_type}(0)")
324324
return args
325325

326326
@property

0 commit comments

Comments
 (0)