chore(api/models): apply ruff reformatting (#7600)

Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Bowen Liang
2024-09-10 17:08:06 +08:00
committed by GitHub
parent d1605952b0
commit d109881410
14 changed files with 1265 additions and 1138 deletions

View File

@@ -9,13 +9,13 @@ class StringUUID(TypeDecorator):
def process_bind_param(self, value, dialect):
if value is None:
return value
elif dialect.name == 'postgresql':
elif dialect.name == "postgresql":
return str(value)
else:
return value.hex
def load_dialect_impl(self, dialect):
if dialect.name == 'postgresql':
if dialect.name == "postgresql":
return dialect.type_descriptor(UUID())
else:
return dialect.type_descriptor(CHAR(36))
@@ -23,4 +23,4 @@ class StringUUID(TypeDecorator):
def process_result_value(self, value, dialect):
if value is None:
return value
return str(value)
return str(value)