We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5666393 commit 2dd20e3Copy full SHA for 2dd20e3
src/betterproto/plugin/models.py
@@ -725,6 +725,9 @@ def __post_init__(self) -> None:
725
self.parent.methods.append(self)
726
727
# Check for imports
728
+ if "Optional" in self.py_input_message_type:
729
+ self.output_file.typing_imports.add("Optional")
730
+
731
if "Optional" in self.py_output_message_type:
732
self.output_file.typing_imports.add("Optional")
733
0 commit comments