Skip to content

Commit 92f52a3

Browse files
aminalaeetiangolo
andauthored
♻ Refactor internal imports to reduce redundancy (#272)
Co-authored-by: Sebastián Ramírez <[email protected]>
1 parent 2bc915e commit 92f52a3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sqlmodel/sql/sqltypes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import uuid
22
from typing import Any, Optional, cast
33

4-
from sqlalchemy import types
4+
from sqlalchemy import CHAR, types
55
from sqlalchemy.dialects.postgresql import UUID
66
from sqlalchemy.engine.interfaces import Dialect
77
from sqlalchemy.sql.type_api import TypeEngine
8-
from sqlalchemy.types import CHAR, TypeDecorator
98

109

1110
class AutoString(types.TypeDecorator): # type: ignore
@@ -23,7 +22,7 @@ def load_dialect_impl(self, dialect: Dialect) -> "types.TypeEngine[Any]":
2322

2423
# Reference form SQLAlchemy docs: https://docs.sqlalchemy.org/en/14/core/custom_types.html#backend-agnostic-guid-type
2524
# with small modifications
26-
class GUID(TypeDecorator): # type: ignore
25+
class GUID(types.TypeDecorator): # type: ignore
2726
"""Platform-independent GUID type.
2827
2928
Uses PostgreSQL's UUID type, otherwise uses

0 commit comments

Comments
 (0)