@@ -81,7 +81,7 @@ class SimpleKGPipelineConfig(TemplatePipelineConfig):
81
81
entities : Sequence [EntityInputType ] = []
82
82
relations : Sequence [RelationInputType ] = []
83
83
potential_schema : Optional [list [tuple [str , str , str ]]] = None
84
- schema : Optional [Union [SchemaConfig , dict [str , list [Any ]]]] = None
84
+ schema : Optional [Union [SchemaConfig , dict [str , list [Any ]]]] = None # type: ignore
85
85
enforce_schema : SchemaEnforcementMode = SchemaEnforcementMode .NONE
86
86
on_error : OnError = OnError .IGNORE
87
87
prompt_template : Union [ERExtractionTemplate , str ] = ERExtractionTemplate ()
@@ -97,10 +97,10 @@ class SimpleKGPipelineConfig(TemplatePipelineConfig):
97
97
model_config = ConfigDict (arbitrary_types_allowed = True )
98
98
99
99
@model_validator (mode = "after" )
100
- def handle_schema_precedence (self ) -> T :
100
+ def handle_schema_precedence (self ) -> T : # type: ignore
101
101
"""Handle schema precedence and warnings"""
102
102
self ._process_schema_parameters ()
103
- return self
103
+ return self # type: ignore
104
104
105
105
def _process_schema_parameters (self ) -> None :
106
106
"""
@@ -192,12 +192,12 @@ def _process_schema_with_precedence(
192
192
if isinstance (self .schema , SchemaConfig ):
193
193
# extract components from SchemaConfig
194
194
entities = list (self .schema .entities .values ())
195
- relations = list (self .schema .relations .values ())
195
+ relations = list (self .schema .relations .values ()) # type: ignore
196
196
potential_schema = self .schema .potential_schema
197
197
else :
198
198
# extract from dictionary
199
199
entities = [
200
- SchemaEntity .from_text_or_dict (e )
200
+ SchemaEntity .from_text_or_dict (e ) # type: ignore
201
201
for e in self .schema .get ("entities" , [])
202
202
]
203
203
relations = [
@@ -208,7 +208,7 @@ def _process_schema_with_precedence(
208
208
else :
209
209
# use individual components
210
210
entities = (
211
- [SchemaEntity .from_text_or_dict (e ) for e in self .entities ]
211
+ [SchemaEntity .from_text_or_dict (e ) for e in self .entities ] # type: ignore
212
212
if self .entities
213
213
else []
214
214
)
@@ -219,7 +219,7 @@ def _process_schema_with_precedence(
219
219
)
220
220
potential_schema = self .potential_schema
221
221
222
- return entities , relations , potential_schema
222
+ return entities , relations , potential_schema # type: ignore
223
223
224
224
def _get_run_params_for_schema (self ) -> dict [str , Any ]:
225
225
if self .auto_schema_extraction and not self .has_user_provided_schema ():
0 commit comments