@@ -7,7 +7,7 @@ def test_relation_resolution_if_include_relations_not_set(clear_sqlmodel):
7
7
class Team (SQLModel , table = True ):
8
8
id : Optional [int ] = Field (default = None , primary_key = True )
9
9
name : str
10
- heroes : List ["Hero" ] = Relationship (back_populates = "team" )
10
+ heroes : List ["Hero" ] = Relationship (back_populates = "team" ) # noqa: F821
11
11
12
12
class Config :
13
13
orm_mode = True
@@ -42,7 +42,7 @@ def test_relation_resolution_if_include_relations_is_set(clear_sqlmodel):
42
42
class Team (SQLModel , table = True ):
43
43
id : Optional [int ] = Field (default = None , primary_key = True )
44
44
name : str
45
- heroes : List ["Hero" ] = Relationship (back_populates = "team" )
45
+ heroes : List ["Hero" ] = Relationship (back_populates = "team" ) # noqa: F821
46
46
47
47
class Config :
48
48
orm_mode = True
@@ -77,7 +77,7 @@ def test_relation_resolution_if_include_relations_is_set_for_nested(clear_sqlmod
77
77
class Team (SQLModel , table = True ):
78
78
id : Optional [int ] = Field (default = None , primary_key = True )
79
79
name : str
80
- heroes : List ["Hero" ] = Relationship (back_populates = "team" )
80
+ heroes : List ["Hero" ] = Relationship (back_populates = "team" ) # noqa: F821
81
81
82
82
class Config :
83
83
orm_mode = True
@@ -86,7 +86,7 @@ class Config:
86
86
class Hero (SQLModel , table = True ):
87
87
id : Optional [int ] = Field (default = None , primary_key = True )
88
88
name : str
89
- powers : List ["Power" ] = Relationship (back_populates = "hero" )
89
+ powers : List ["Power" ] = Relationship (back_populates = "hero" ) # noqa: F821
90
90
team_id : Optional [int ] = Field (default = None , foreign_key = "team.id" )
91
91
team : Optional [Team ] = Relationship (back_populates = "heroes" )
92
92
@@ -128,7 +128,7 @@ def test_relation_resolution_if_lazy_selectin_not_set_with_fastapi(clear_sqlmode
128
128
class Team (SQLModel , table = True ):
129
129
id : Optional [int ] = Field (default = None , primary_key = True )
130
130
name : str
131
- heroes : List ["Hero" ] = Relationship (back_populates = "team" )
131
+ heroes : List ["Hero" ] = Relationship (back_populates = "team" ) # noqa: F821
132
132
133
133
class Config :
134
134
orm_mode = True
@@ -137,7 +137,7 @@ class Config:
137
137
class Hero (SQLModel , table = True ):
138
138
id : Optional [int ] = Field (default = None , primary_key = True )
139
139
name : str
140
- powers : List ["Power" ] = Relationship (back_populates = "hero" )
140
+ powers : List ["Power" ] = Relationship (back_populates = "hero" ) # noqa: F821
141
141
team_id : Optional [int ] = Field (default = None , foreign_key = "team.id" )
142
142
team : Optional [Team ] = Relationship (back_populates = "heroes" )
143
143
@@ -191,7 +191,7 @@ def test_relation_resolution_if_lazy_selectin_is_set_with_fastapi(clear_sqlmodel
191
191
class Team (SQLModel , table = True ):
192
192
id : Optional [int ] = Field (default = None , primary_key = True )
193
193
name : str
194
- heroes : List ["Hero" ] = Relationship (
194
+ heroes : List ["Hero" ] = Relationship ( # noqa: F821
195
195
back_populates = "team" , sa_relationship_kwargs = {"lazy" : "selectin" }
196
196
)
197
197
@@ -202,7 +202,7 @@ class Config:
202
202
class Hero (SQLModel , table = True ):
203
203
id : Optional [int ] = Field (default = None , primary_key = True )
204
204
name : str
205
- powers : List ["Power" ] = Relationship (
205
+ powers : List ["Power" ] = Relationship ( # noqa: F821
206
206
back_populates = "hero" , sa_relationship_kwargs = {"lazy" : "selectin" }
207
207
)
208
208
team_id : Optional [int ] = Field (default = None , foreign_key = "team.id" )
0 commit comments