Skip to content

Commit

Permalink
remove 3.10 typing syntax 4
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestfwilliams committed Aug 25, 2023
1 parent e00f902 commit 65d518d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/index_safe/create_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def create_burst_name(slc_name: str, swath_name: str, burst_index: str) -> str:

def create_burst_dflidx(
indexer: utils.ZipIndexer, burst_offset: utils.Offset
) -> tuple[utils.Offset, utils.Offset, bytes]:
) -> Iterable[Union[utils.Offset, utils.Offset, bytes]]:
"""Create a burst-specific zran index containing information needed to download burst tiff from compressed
Args:
Expand Down Expand Up @@ -195,14 +195,14 @@ def save_xml_metadata_as_json(entries: Iterable[utils.XmlMetadata], out_name: st
return out_name


def get_indexes(zipped_safe_path: Path) -> tuple[list[utils.XmlMetadata], dict[str : utils.BurstMetadata]]:
def get_indexes(zipped_safe_path: Path) -> Iterable:
"""Get indexes for XML and bursts in zipped SAFE.
Args:
zipped_safe_path: Path to zipped SAFE
Returns: tuple of lists of XmlMetadata and BurstMetadata objects
Returns:
tuple of lists of XmlMetadata and BurstMetadata objects
"""
with zipfile.ZipFile(zipped_safe_path) as f:
tiffs = [x for x in f.infolist() if 'tiff' in Path(x.filename).name]
Expand Down
2 changes: 1 addition & 1 deletion src/index_safe/extract_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(self, template_path: Union[Path, str]):
self.template_path = Path(template_path)

def render_to(
self, out_path: Union[Path, str], metadata_paths: list[Union[Path, str]], manifest_path: Union[Path, str]
self, out_path: Union[Path, str], metadata_paths: Iterable[Union[Path, str]], manifest_path: Union[Path, str]
):
"""Render xml using xslt transformation and save to out_path.
Expand Down

0 comments on commit 65d518d

Please sign in to comment.