From f041211d5a1b41d38c41ffa147a6c4dded2de49a Mon Sep 17 00:00:00 2001 From: Scott Staniewicz Date: Fri, 7 Jul 2023 10:51:40 -0400 Subject: [PATCH] try capping precommit pydantic (#100) the type:ignores came up at astrange time, possibly because it was using version 2 --- .pre-commit-config.yaml | 2 +- src/dolphin/workflows/config.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a51a073c..3d09386a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,7 @@ repos: additional_dependencies: - types-pkg_resources - types-requests - - "pydantic>=1.10.0" + - "pydantic>=1.10.0,<2" - repo: https://github.com/PyCQA/pydocstyle rev: "6.3.0" diff --git a/src/dolphin/workflows/config.py b/src/dolphin/workflows/config.py index 9c063a52..e78af664 100644 --- a/src/dolphin/workflows/config.py +++ b/src/dolphin/workflows/config.py @@ -124,7 +124,7 @@ class InterferogramNetwork(BaseModel, extra=Extra.forbid): network_type: InterferogramNetworkType = InterferogramNetworkType.SINGLE_REFERENCE # validation - @root_validator # type: ignore + @root_validator def _check_network_type(cls, values): ref_idx = values.get("reference_idx") max_bw = values.get("max_bandwidth") @@ -412,7 +412,7 @@ def _is_opera_file_list(cslc_file_list): re.search(OPERA_BURST_RE, str(f)) is not None for f in cslc_file_list ) - @root_validator # type: ignore + @root_validator def _check_slc_files_exist(cls, values): file_list = values.get("cslc_file_list") if not file_list: