Skip to content

Commit 00b8646

Browse files
🎨 Auto format
1 parent e73709b commit 00b8646

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sqlmodel/_compat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def _is_union_type(t: Any) -> bool:
6565
return t is UnionType or t is Union
6666

6767

68-
def get_literal_annotation_info(annotation: Any) -> tuple[type[Any], tuple[Any, ...]] | None:
68+
def get_literal_annotation_info(
69+
annotation: Any,
70+
) -> tuple[type[Any], tuple[Any, ...]] | None:
6971
if annotation is None or get_origin(annotation) is None:
7072
return None
7173
origin = get_origin(annotation)

tests/test_main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from typing import Literal, Optional, Union
22

33
import pytest
4-
from sqlalchemy.exc import IntegrityError
54
from sqlalchemy import text
5+
from sqlalchemy.exc import IntegrityError
66
from sqlalchemy.orm import RelationshipProperty
77
from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select
88

@@ -258,8 +258,7 @@ class Model(SQLModel, table=True):
258258
# Invalid values should be rejected by the database
259259
def insert_raw(values: dict[str, object]) -> None:
260260
stmt = text(
261-
"INSERT INTO model (opt_str, union_int) "
262-
"VALUES (:opt_str, :union_int)"
261+
"INSERT INTO model (opt_str, union_int) VALUES (:opt_str, :union_int)"
263262
).bindparams(**values)
264263
with pytest.raises(IntegrityError):
265264
with Session(engine) as session:

0 commit comments

Comments
 (0)