File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -456,9 +456,6 @@ def Field(
456456 else :
457457 current_json_schema_extra [key ] = value
458458
459- print (current_pydantic_kwargs )
460- print (current_json_schema_extra )
461-
462459 field_info = FieldInfo (
463460 default ,
464461 default_factory = default_factory ,
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ class User(SQLModel):
3737
3838
3939def test_schema_extra_and_new_param_conflict ():
40+ '''test that passing schema_extra and new params at the same time raises an error'''
41+
4042 with pytest .raises (RuntimeError ) as excinfo :
4143
4244 class ItemA (SQLModel ):
@@ -63,7 +65,6 @@ def test_schema_extra_backward_compatibility():
6365 test that schema_extra is backward compatible with json_schema_extra
6466 """
6567
66- # 1. 定义一个仅使用 schema_extra 的模型
6768 class LegacyItem (SQLModel ):
6869 name : str = Field (
6970 schema_extra = {
You can’t perform that action at this time.
0 commit comments