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

Commit 1ef0c1f

Browse files
committed
Fix typing errors
1 parent 04414e6 commit 1ef0c1f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/betterproto2_compiler/plugin/models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def py_name(self) -> str:
246246

247247
@property
248248
def deprecated(self) -> bool:
249-
return self.proto_obj.options and self.proto_obj.options.deprecated
249+
return bool(self.proto_obj.options and self.proto_obj.options.deprecated)
250250

251251
@property
252252
def deprecated_fields(self) -> Iterator[str]:
@@ -335,7 +335,7 @@ def betterproto_field_args(self) -> list[str]:
335335

336336
@property
337337
def deprecated(self) -> bool:
338-
return self.proto_obj.options and self.proto_obj.options.deprecated
338+
return bool(self.proto_obj.options and self.proto_obj.options.deprecated)
339339

340340
@property
341341
def use_builtins(self) -> bool:
@@ -439,8 +439,8 @@ def betterproto_field_args(self) -> list[str]:
439439

440440
@dataclass(kw_only=True)
441441
class MapEntryCompiler(FieldCompiler):
442-
py_k_type: type | None = None
443-
py_v_type: type | None = None
442+
py_k_type: str | None = None
443+
py_v_type: str | None = None
444444
proto_k_type: str = ""
445445
proto_v_type: str = ""
446446

@@ -641,4 +641,4 @@ def server_streaming(self) -> bool:
641641

642642
@property
643643
def deprecated(self) -> bool:
644-
return self.proto_obj.options and self.proto_obj.options.deprecated
644+
return bool(self.proto_obj.options and self.proto_obj.options.deprecated)

0 commit comments

Comments
 (0)