Codegen: fix python compatibility problem

This commit is contained in:
Paolo Tranquilli
2023-10-23 16:56:44 +02:00
committed by GitHub
parent 7cc20587ad
commit 02a2debe94

View File

@@ -19,7 +19,7 @@ class _PropertyNamer(schema.PropertyModifier):
prop.name = self.name.rstrip("_")
def _get_name(x: str | type | None):
def _get_name(x: typing.Optional[typing.Union[str, type]]):
if x is None:
return None
if isinstance(x, str):