Skip to content

Commit 0c94bc2

Browse files
fix: linting #737
1 parent 884e619 commit 0c94bc2

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

backend/controllers/facets_controller.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pydantic import BaseModel
33

44
from backend.services.facets_service import compute_facets_from_query
5-
from backend.services.facets_service import FacetsResponse
5+
from backend.services.models import FacetsResponse
66

77
from backend.controllers.models import FacetsRequest
88

@@ -11,7 +11,7 @@
1111

1212
@router.post("")
1313
def get_facets(payload: FacetsRequest) -> FacetsResponse:
14-
# NOTE: Stubbed PoC implementation. This will be replaced by
15-
# LLM-backed intent parsing and real facet resolution in a later step.
16-
# For now, delegate to the service layer so the controller stays thin.
14+
"""
15+
Return a stubbed query-to-facets response for PoC purposes.
16+
"""
1717
return compute_facets_from_query()

backend/controllers/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
from pydantic import BaseModel
22

33

4-
# Model of the request body for the /api/v0/facets endpoint.
54
class FacetsRequest(BaseModel):
5+
"""
6+
Request model for the /api/v0/facets endpoint.
7+
Attributes:
8+
query (str): The search query string to retrieve facets for.
9+
"""
10+
611
query: str

backend/services/facets_service.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
from __future__ import annotations
22

3-
from pydantic import BaseModel
4-
5-
63
from backend.services.models import FacetsResponse
74

85

backend/services/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class SelectedValue(BaseModel):
1010
term (str): The resolved facet value.
1111
mention (str): The original query text that resolved to the value.
1212
"""
13+
1314
term: str
1415
mention: str
1516

@@ -23,6 +24,7 @@ class FacetSelection(BaseModel):
2324
facet (str): The name of the facet.
2425
selectedValues (list[SelectedValue]): The list of selected values for this facet.
2526
"""
27+
2628
facet: str
2729
selectedValues: list[SelectedValue]
2830

@@ -36,5 +38,6 @@ class FacetsResponse(BaseModel):
3638
query (str): The original query string.
3739
facets (list[FacetSelection]): The list of selected facets and their values.
3840
"""
41+
3942
query: str
4043
facets: list[FacetSelection]

0 commit comments

Comments
 (0)