Skip to content

Commit acb12ca

Browse files
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
1 parent 4de75b5 commit acb12ca

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

sqlmodel/sql/sqltypes.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
from typing import Any, cast, Optional, TypeVar
21
from enum import IntEnum as _IntEnum
2+
from typing import Any, Optional, TypeVar, cast
33

44
from sqlalchemy import types
55
from sqlalchemy.engine.interfaces import Dialect
66

7-
8-
_TIntEnum = TypeVar('_TIntEnum', bound="_IntEnum")
7+
_TIntEnum = TypeVar("_TIntEnum", bound="_IntEnum")
98

109

1110
class AutoString(types.TypeDecorator): # type: ignore
@@ -56,16 +55,18 @@ def __init__(self, enum_type: _TIntEnum, *args, **kwargs):
5655

5756
self.enum_type = enum_type
5857

59-
def process_result_value(self, value: Optional[int], dialect: Dialect) -> Optional[_TIntEnum]:
60-
58+
def process_result_value(
59+
self, value: Optional[int], dialect: Dialect
60+
) -> Optional[_TIntEnum]:
6161
if value is None:
6262
return None
6363

6464
result = self.enum_type(value)
6565
return result
6666

67-
def process_bind_param(self, value: Optional[_TIntEnum], dialect: Dialect) -> Optional[int]:
68-
67+
def process_bind_param(
68+
self, value: Optional[_TIntEnum], dialect: Dialect
69+
) -> Optional[int]:
6970
if value is None:
7071
return None
7172

0 commit comments

Comments
 (0)