10000 Fix some annotations · Gobot1234/python-betterproto@0b15d46 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b15d46

Browse files
committed
Fix some annotations
1 parent 9f51d15 commit 0b15d46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/betterproto/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def from_string(cls, name: str) -> "Enum":
351351

352352
def encode_varint(value: int) -> bytes:
353353
"""Encodes a single varint value for serialization."""
354-
b: "List[int]" = []
354+
b: List[int] = []
355355

356356
if value < 0:
357357
value += 1 << 64
@@ -1212,7 +1212,7 @@ def from_dict(self: T, value: Dict[str, Any]) -> T:
12121212

12131213
if meta.proto_type == TYPE_MESSAGE:
12141214
v = getattr(self, field_name)
1215-
cls: type[Message] = self._betterproto.cls_by_field[field_name]
1215+
cls: Type[Message] = self._betterproto.cls_by_field[field_name]
12161216
if isinstance(v, list):
12171217
if cls is datetime:
12181218
v = [isoparse(item) for item in value_]
@@ -1252,7 +1252,7 @@ def from_dict(self: T, value: Dict[str, Any]) -> T:
12521252
else b64decode(value_)
12531253
)
12541254
elif meta.proto_type == TYPE_ENUM:
1255-
enum_cls: type[Enum] = self._betterproto.cls_by_field[field_name]
1255+
enum_cls: Type[Enum] = self._betterproto.cls_by_field[field_name]
12561256
if isinstance(value_, list):
12571257
v = [enum_cls.from_string(e) for e in value_]
12581258
elif isinstance(value_, str):

0 commit comments

Comments
 (0)
0