EOX GitLab Instance

Commit 1148d8e4 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Fixing typing

Fixing typo
parent 94d2f47c
Pipeline #19409 failed with stages
in 37 seconds
import json
import logging
from typing import Iterator, Optional
from typing import Iterator, Optional, Union
from redis import Redis
......@@ -18,7 +18,7 @@ def stringify(
result: Iterator[dict],
mode: str = "item",
extract_property: Optional[str] = None,
) -> Iterator[dict]:
) -> Iterator[Union[dict, str]]:
if mode == "item":
yield from (json.dumps(item, default=str) for item in result)
elif mode == "property":
......@@ -161,7 +161,7 @@ class S3CatalogSource(S3Base, Source):
catalog = self.fetch_json(bucket, key)
for link in catalog["links"]:
if link["rel"] == "item":
item_bucket, item_key = self.join(bucket, key, link["href"])
item_bucket, item_key = self.join_href(bucket, key, link["href"])
logger.info(f"Harvested item {item_bucket}/{item_key}")
yield self.fetch_json(item_bucket, item_key)
elif link["rel"] == "child":
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment