You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This is an automatically generated file, please do not change# gen by protobuf_to_pydantic[v0.2.3](https://github.com/so1n/protobuf_to_pydantic)# Protobuf Version: 4.25.2 # Pydantic Version: 2.6.1 fromgoogle.protobuf.messageimportMessage# type: ignorefrompydanticimportBaseModelfrompydanticimportFieldclassBlub(BaseModel):
whatever: int=Field(default=0)
classCheckCreateCommitFromPreparationResponse(BaseModel):
blib: typing.Optional[Blub] =Field(default=None)
Which misses the import for typing and therefore the last lines errors on import.
To Reproduce
Steps to reproduce the behavior:
Install the above versions (see python version)
convert proto to pydantic
try to import the pydantic file
See error: NameError: name 'typing' is not defined. Did you forget to import 'typing'
Expected behavior
There is a typing import in the generated file and I can import the generated file without an error
The text was updated successfully, but these errors were encountered:
Describe the bug
The following (shortend) proto file creates a non-valid pydantic python file:
Converting with protobuf-to-pydantic gives this
Which misses the import for typing and therefore the last lines errors on import.
To Reproduce
Steps to reproduce the behavior:
NameError: name 'typing' is not defined. Did you forget to import 'typing'
Expected behavior
There is a typing import in the generated file and I can import the generated file without an error
The text was updated successfully, but these errors were encountered: