From 9b69a8b73f91c4f6d137c738dbe49f69e87a2425 Mon Sep 17 00:00:00 2001 From: dextmorgn <64375473+dextmorgn@users.noreply.github.com> Date: Fri, 18 Sep 2026 16:45:55 +0200 Subject: [PATCH] chore(api,core): remove dead enricher schemas, unreachable wobbly_type branch, dead set_params() EnricherCreate/EnricherRead/EnricherUpdate had no importer anywhere in the repo and were the whole content of app/api/schemas/enricher.py, so the module goes with them. get_enrichers' custom-type branch returns [] before reaching the wobbly_type=True registry listing. The early return stays (why a published custom type lists no enrichers is a separate question); the line it strands does not. EnricherBase.set_params() had no caller and no dynamic-dispatch site; resolve_params/async_init assign self.params directly. --- flowsint-api/app/api/schemas/enricher.py | 27 ------------------- .../src/flowsint_core/core/enricher_base.py | 3 --- .../core/services/enricher_service.py | 1 - 3 files changed, 31 deletions(-) delete mode 100644 flowsint-api/app/api/schemas/enricher.py diff --git a/flowsint-api/app/api/schemas/enricher.py b/flowsint-api/app/api/schemas/enricher.py deleted file mode 100644 index af5b3ccf..00000000 --- a/flowsint-api/app/api/schemas/enricher.py +++ /dev/null @@ -1,27 +0,0 @@ -from typing import Any, Dict, List, Optional - -from pydantic import UUID4, BaseModel - -from .base import ORMBase - - -class EnricherCreate(BaseModel): - name: str - description: Optional[str] = None - category: Optional[List[str]] = None - - -class EnricherRead(ORMBase): - id: UUID4 - name: str - class_name: str - description: Optional[str] - category: Optional[List[str]] - flow_schema: Optional[Dict[str, Any]] - - -class EnricherUpdate(BaseModel): - name: Optional[str] = None - class_name: Optional[str] = None - description: Optional[str] = None - category: Optional[List[str]] = None diff --git a/flowsint-core/src/flowsint_core/core/enricher_base.py b/flowsint-core/src/flowsint_core/core/enricher_base.py index 5e071bc3..51dbc148 100644 --- a/flowsint-core/src/flowsint_core/core/enricher_base.py +++ b/flowsint-core/src/flowsint_core/core/enricher_base.py @@ -339,9 +339,6 @@ class Enricher(ABC): async def scan(self, values: List[str]) -> List[Dict[str, Any]]: pass - def set_params(self, params: Dict[str, Any]) -> None: - self.params = params - def get_params(self) -> Dict[str, Any]: return self.params diff --git a/flowsint-core/src/flowsint_core/core/services/enricher_service.py b/flowsint-core/src/flowsint_core/core/services/enricher_service.py index ee93f39b..69afca76 100644 --- a/flowsint-core/src/flowsint_core/core/services/enricher_service.py +++ b/flowsint-core/src/flowsint_core/core/services/enricher_service.py @@ -69,7 +69,6 @@ class EnricherService(BaseService): if custom_type: return [] - return enricher_registry.list(exclude=["n8n_connector"], wobbly_type=True) by_input_type: List[Dict[str, Any]] = enricher_registry.list_by_input_type( category, exclude=["n8n_connector"]