Skip to content

Commit 4eebee5

Browse files
Ignore remaining mypy issues (temp)
1 parent b19e57c commit 4eebee5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/neo4j_graphrag/experimental/pipeline/config/template_pipeline/simple_kg_builder.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class SimpleKGPipelineConfig(TemplatePipelineConfig):
8181
entities: Sequence[EntityInputType] = []
8282
relations: Sequence[RelationInputType] = []
8383
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
8585
enforce_schema: SchemaEnforcementMode = SchemaEnforcementMode.NONE
8686
on_error: OnError = OnError.IGNORE
8787
prompt_template: Union[ERExtractionTemplate, str] = ERExtractionTemplate()
@@ -97,10 +97,10 @@ class SimpleKGPipelineConfig(TemplatePipelineConfig):
9797
model_config = ConfigDict(arbitrary_types_allowed=True)
9898

9999
@model_validator(mode="after")
100-
def handle_schema_precedence(self) -> T:
100+
def handle_schema_precedence(self) -> T: # type: ignore
101101
"""Handle schema precedence and warnings"""
102102
self._process_schema_parameters()
103-
return self
103+
return self # type: ignore
104104

105105
def _process_schema_parameters(self) -> None:
106106
"""
@@ -192,12 +192,12 @@ def _process_schema_with_precedence(
192192
if isinstance(self.schema, SchemaConfig):
193193
# extract components from SchemaConfig
194194
entities = list(self.schema.entities.values())
195-
relations = list(self.schema.relations.values())
195+
relations = list(self.schema.relations.values()) # type: ignore
196196
potential_schema = self.schema.potential_schema
197197
else:
198198
# extract from dictionary
199199
entities = [
200-
SchemaEntity.from_text_or_dict(e)
200+
SchemaEntity.from_text_or_dict(e) # type: ignore
201201
for e in self.schema.get("entities", [])
202202
]
203203
relations = [
@@ -208,7 +208,7 @@ def _process_schema_with_precedence(
208208
else:
209209
# use individual components
210210
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
212212
if self.entities
213213
else []
214214
)
@@ -219,7 +219,7 @@ def _process_schema_with_precedence(
219219
)
220220
potential_schema = self.potential_schema
221221

222-
return entities, relations, potential_schema
222+
return entities, relations, potential_schema # type: ignore
223223

224224
def _get_run_params_for_schema(self) -> dict[str, Any]:
225225
if self.auto_schema_extraction and not self.has_user_provided_schema():

0 commit comments

Comments
 (0)