Skip to content

Commit

Permalink
libcovebods/tasks/checks.py: Fix typing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Sep 23, 2024
1 parent aeba062 commit 6e29551
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions libcovebods/jsonschemavalidate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
from decimal import Decimal
from typing import Union

from jsonschema import FormatChecker
from jsonschema.exceptions import ValidationError
Expand Down Expand Up @@ -101,6 +102,7 @@ def __init__(self, schema: SchemaBODS):

def validate(self, data_reader: libcovebods.data_reader.DataReader) -> list:
"""Call with data. Results are returned."""
validator: Union[Draft4Validator, Draft202012Validator]
if self._schema.is_schema_version_equal_to_or_greater_than("0.4"):
# Get the registry
registry = self._schema._pkg_schema_obj
Expand Down
4 changes: 2 additions & 2 deletions libcovebods/schema_dir.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
from pathlib import Path

from jscc.schema import is_json_schema
from jscc.testing.filesystem import walk_json_data
from jscc.schema import is_json_schema # type: ignore
from jscc.testing.filesystem import walk_json_data # type: ignore
from referencing import Registry, Resource
from referencing.jsonschema import DRAFT202012

Expand Down
2 changes: 1 addition & 1 deletion libcovebods/tasks/checks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections import defaultdict
from datetime import datetime

import jsonpointer
import jsonpointer # type: ignore
import pycountry
from libcove2.common import get_orgids_prefixes # type: ignore

Expand Down

0 comments on commit 6e29551

Please sign in to comment.