Skip to content

Commit

Permalink
try capping precommit pydantic (#100)
Browse files Browse the repository at this point in the history
the type:ignores came up at astrange time, possibly because it was using version 2
  • Loading branch information
scottstanie authored Jul 7, 2023
1 parent 03c4a67 commit f041211
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/dolphin/workflows/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f041211

Please sign in to comment.