Skip to content

Commit 51a5ddf

Browse files
committed
resolve mypy
1 parent 749106b commit 51a5ddf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

airbyte_cdk/sources/utils/schema_helpers.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99
import pkgutil
1010
from copy import deepcopy
11-
from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Mapping, MutableMapping, Tuple
11+
from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Mapping, MutableMapping, Tuple, cast
1212

1313
import jsonref
1414
from jsonschema import validate
@@ -73,9 +73,12 @@ def get_ref_resolver_registry(schema: dict[str, Any]) -> Registry:
7373
contents=schema,
7474
default_specification=DRAFT7,
7575
)
76-
return Registry().with_resource(
77-
uri="",
78-
resource=resource,
76+
return cast( # Mypy has a hard time detecting this return type.
77+
"Registry",
78+
Registry().with_resource(
79+
uri="",
80+
resource=resource,
81+
),
7982
)
8083

8184

0 commit comments

Comments
 (0)