Skip to content

Commit a69a29b

Browse files
author
KunxiSun
committed
style: remove Optional and type ignore
1 parent 3d8db41 commit a69a29b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sqlmodel/sql/sqltypes.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import enum
22
from datetime import datetime, timedelta, timezone
33
from enum import IntEnum as _IntEnum
4-
from typing import Any, Optional, TypeVar, cast
4+
from typing import Any, TypeVar, cast
55

66
from sqlalchemy import types
77
from sqlalchemy.engine.interfaces import Dialect
@@ -51,7 +51,7 @@ def process_result_value(
5151
return value.astimezone(timezone.utc)
5252

5353

54-
class AutoString(types.TypeDecorator): # type: ignore
54+
class AutoString(types.TypeDecorator):
5555
impl = types.String
5656
cache_ok = True
5757
mysql_default_length = 255
@@ -66,7 +66,7 @@ def load_dialect_impl(self, dialect: Dialect) -> "types.TypeEngine[Any]":
6666
_TIntEnum = TypeVar("_TIntEnum", bound="_IntEnum")
6767

6868

69-
class IntEnum(types.TypeDecorator[Optional[_TIntEnum]]):
69+
class IntEnum(types.TypeDecorator[_TIntEnum | None]):
7070
impl = types.SmallInteger
7171
cache_ok = True
7272

0 commit comments

Comments
 (0)