From ab3271cb5a7bf9688323fff2c79ab8140105d101 Mon Sep 17 00:00:00 2001 From: Katy Baulch <46493669+katybaulch@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:55:40 +0100 Subject: [PATCH] Added pydantic to cpsell dict --- .trunk/configs/cspell.json | 3 ++- gcf_data_mapper/parsers/document.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.trunk/configs/cspell.json b/.trunk/configs/cspell.json index 77c9350..226d7d8 100644 --- a/.trunk/configs/cspell.json +++ b/.trunk/configs/cspell.json @@ -38,7 +38,8 @@ "conftest", "capsys", "dtypes", - "isin" + "isin", + "pydantic" ], "flagWords": ["hte"], "suggestionsTimeout": 5000 diff --git a/gcf_data_mapper/parsers/document.py b/gcf_data_mapper/parsers/document.py index 074abbd..d33f7c2 100644 --- a/gcf_data_mapper/parsers/document.py +++ b/gcf_data_mapper/parsers/document.py @@ -64,6 +64,8 @@ def contains_invalid_paths(urls: list[str]) -> bool: def validate_urls(urls: list[str], doc_id: str) -> Optional[bool]: """Validate a list of URLs for empty, duplicate, & malformed entries. + TODO can we use Pydantic for this? + param: list[str] urls : A list of urls param: str doc_id: The document id of the invalid source urls raises ValueError: If the list contains duplicate, empty or,