Skip to content
Snippets Groups Projects
Verified Commit 7fa961af authored by Jakob Moser's avatar Jakob Moser
Browse files

Use Optional instead of | None for consistency

parent 3098ca66
No related branches found
No related tags found
1 merge request!22Make MyPy happy
...@@ -27,7 +27,7 @@ class Uuid(types.TypeDecorator): ...@@ -27,7 +27,7 @@ class Uuid(types.TypeDecorator):
return types.String(UUID_LENGTH) return types.String(UUID_LENGTH)
def process_bind_param( def process_bind_param(
self, value: None | str | UUID, dialect: Dialect self, value: Optional[str | UUID], dialect: Dialect
) -> Optional[str]: ) -> Optional[str]:
if isinstance(value, str): if isinstance(value, str):
# Manually create UUID from string, to raise an error if the string is malformed # Manually create UUID from string, to raise an error if the string is malformed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment