fix(integrations): TrelloConfig inherits StrictConfigModel instead of BaseModel#2671
fix(integrations): TrelloConfig inherits StrictConfigModel instead of BaseModel#2671luojiyin1987 wants to merge 1 commit into
Conversation
Greptile code reviewThis repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md. Run a review — add a PR comment with: Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5. Optional: automate with the greploop skill. |
Greptile SummaryThis PR fixes a consistency gap where
Confidence Score: 5/5Safe to merge — a one-line base-class change with no behavioral regression for valid inputs. The change is minimal and well-scoped: swapping the base class adds stricter validation without altering how any existing valid config is processed. The two mode="before" string-stripping validators are fully compatible and idempotent when composed. No other code paths are touched. No files require special attention. Important Files Changed
Class Diagram%%{init: {'theme': 'neutral'}}%%
classDiagram
class BaseModel {
<<pydantic>>
}
class StrictConfigModel {
+model_config: ConfigDict(extra="forbid")
+_strip_string_values(value) Any
+_reject_unknown_fields(data) Any
}
class TrelloConfig {
+base_url: str
+api_key: str
+token: str
+board_id: str
+list_id: str
+timeout_seconds: float
+_normalize_base_url(value) str
+api_base_url: str
}
BaseModel <|-- StrictConfigModel : inherits
StrictConfigModel <|-- TrelloConfig : inherits (after fix)
note for TrelloConfig "Previously inherited BaseModel directly"
Reviews (1): Last reviewed commit: "fix(integrations): TrelloConfig inherits..." | Re-trigger Greptile |
Closes #2670
TrelloConfig in
app/integrations/trello.pyinherits frompydantic.BaseModeldirectly, while every other integration config model in the project (81 usages) inherits fromStrictConfigModel.Changes
BaseModelwithStrictConfigModelfrom app.strict_config import StrictConfigModelimportTrelloConfignow gains: