Skip to content

Commit

Permalink
Merge pull request #62 from rossumai/stepan-s/fix-model-automation-bl…
Browse files Browse the repository at this point in the history
…ocker-samples

fix(models:automation_blocker): fix type of `samples`
  • Loading branch information
bara-m authored Mar 25, 2024
2 parents 2e5aeff + 06d2272 commit e459253
Show file tree
Hide file tree
Showing 3 changed files with 12 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 @@ -9,7 +9,7 @@ repos:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.940
rev: v0.981
hooks:
- id: mypy
additional_dependencies: [
Expand Down
2 changes: 1 addition & 1 deletion rossum_api/models/automation_blocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AutomationBlockerContent:
type: str
schema_id: Optional[str] = None
samples_truncated: Optional[bool] = False
samples: Dict[str, Any] = field(default_factory=dict)
samples: List[Dict[str, Any]] = field(default_factory=list)
details: Dict[str, Any] = field(default_factory=dict)


Expand Down
11 changes: 10 additions & 1 deletion tests/elis_api_client/test_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,16 @@ def dummy_annotation_with_sideloads():
"automation_blocker": {
"id": 981916,
"url": "https://elis.develop.r8.lol/api/v1/automation_blockers/981916",
"content": [{"type": "automation_disabled", "level": "annotation"}],
"content": [
{"type": "automation_disabled", "level": "annotation"},
{
"level": "datapoint",
"type": "error_message",
"samples": [
{"details": {"message_content": ["Total Amount is most likely not empty"]}}
],
},
],
"annotation": "https://elis.develop.r8.lol/api/v1/annotations/3232238",
},
"email_thread": None,
Expand Down

0 comments on commit e459253

Please sign in to comment.