Skip to content

Commit

Permalink
Merge pull request #12 from asafalina/main
Browse files Browse the repository at this point in the history
fix type hint
  • Loading branch information
Ed-XCF authored Apr 18, 2024
2 parents 9a0ef12 + 92965b6 commit a455c06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protobuf2pydantic/biz.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from os import linesep
from typing import List
from typing import List, Optional
from functools import partial

from google.protobuf.reflection import GeneratedProtocolMessageType
Expand Down Expand Up @@ -61,7 +61,7 @@ def add_defined_class(level: int, class_name: str):
defined_classes[level].append(class_name)


def convert_field(level: int, field: FieldDescriptor) -> str | None:
def convert_field(level: int, field: FieldDescriptor) -> Optional[str]:
level += 1
field_type = field.type
field_label = field.label
Expand Down

0 comments on commit a455c06

Please sign in to comment.