File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11"""This module contains the UriResolverAggregator Resolver."""
2- from typing import List , Optional
2+ from typing import List , Optional , cast
33
44from polywrap_core import (
55 InvokerClient ,
66 IUriResolutionContext ,
77 Uri ,
8+ UriPackage ,
89 UriPackageOrWrapper ,
910 UriResolver ,
11+ UriWrapper ,
1012)
1113
1214from ...types import UriResolutionStep
@@ -68,15 +70,17 @@ async def try_resolve_uri(
6870 uri_package_or_wrapper = await resolver .try_resolve_uri (
6971 uri , client , sub_context
7072 )
71- if uri_package_or_wrapper != uri :
73+ if uri_package_or_wrapper != uri or isinstance (
74+ uri_package_or_wrapper , (UriPackage , UriWrapper )
75+ ):
7276 step = UriResolutionStep (
7377 source_uri = uri ,
74- result = uri_package_or_wrapper ,
78+ result = cast ( UriPackageOrWrapper , uri_package_or_wrapper ) ,
7579 sub_history = sub_context .get_history (),
7680 description = self .step_description ,
7781 )
7882 resolution_context .track_step (step )
79- return uri_package_or_wrapper
83+ return cast ( UriPackageOrWrapper , uri_package_or_wrapper )
8084
8185 step = UriResolutionStep (
8286 source_uri = uri ,
You can’t perform that action at this time.
0 commit comments