Skip to content

Commit 1b69033

Browse files
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
1 parent 38dc566 commit 1b69033

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

sqlmodel/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,12 @@ def get_config(name: str) -> Any:
567567
if isinstance(original_field, FieldInfo):
568568
field = original_field
569569
else:
570-
annotated_field_meta = new_cls.__annotations__[k].__dict__.get("__metadata__", [])
571-
field = next((f for f in annotated_field_meta if isinstance(f, FieldInfo)), v)
570+
annotated_field_meta = new_cls.__annotations__[k].__dict__.get(
571+
"__metadata__", []
572+
)
573+
field = next(
574+
(f for f in annotated_field_meta if isinstance(f, FieldInfo)), v
575+
)
572576
field.annotation = v.annotation
573577
# Guarantee the field has the correct type
574578
col = get_column_from_field(field)

tests/test_declaration_syntax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Annotated
22

3-
from sqlmodel import SQLModel, Field
3+
from sqlmodel import Field, SQLModel
44

55

66
def test_declaration_syntax_1():

0 commit comments

Comments
 (0)