def resolve_output_to_url(self, ctx, item):
        request = get_current_request()

        if not path.isabs(item):
            if ':' not in item:
                if 'asset_base' in ctx.config:
                    if ctx.config['asset_base'].endswith(':'):
                        item = ctx.config['asset_base'] + item
                    else:
                        item = path.join(ctx.config['asset_base'], item)
                else:
                    item = path.join(ctx.directory, item)

        if ':' in item:
            filepath = self._resolve_spec(item)
        else:
            filepath = item

        if request is not None:
            for attempt in (filepath, item):
                try:
                    return request.static_url(item)
                except __HOLE__:
                    pass

        if USING_WEBASSETS_CONTEXT:
            return super(PyramidResolver, self).resolve_output_to_url(
                ctx,
                filepath
            )
        else:  # pragma: no cover
            return super(PyramidResolver, self).resolve_output_to_url(filepath)
dataset/ETHPy150Open sontek/pyramid_webassets/pyramid_webassets/__init__.py/PyramidResolver.resolve_output_to_url