Skip to content

Commit

Permalink
Support older python version type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Funke committed Apr 26, 2024
1 parent 71a6ef4 commit c2e21b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions funlib/geometry/roi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .freezable import Freezable

import copy
from typing import Iterable, Union, Optional
from typing import Iterable, Union, Optional, Tuple
import logging

logger = logging.getLogger(__file__)
Expand Down Expand Up @@ -154,7 +154,7 @@ def center(self) -> Coordinate:
def get_center(self) -> Coordinate:
return self.center

def to_slices(self) -> tuple[slice, ...]:
def to_slices(self) -> Tuple[slice, ...]:
"""Get a ``tuple`` of ``slice`` that represent this ROI and can be used
to index arrays."""
slices = []
Expand All @@ -171,7 +171,7 @@ def to_slices(self) -> tuple[slice, ...]:

return tuple(slices)

def get_bounding_box(self) -> tuple[slice, ...]:
def get_bounding_box(self) -> Tuple[slice, ...]:
"""Alias for ``to_slices()``."""

return self.to_slices()
Expand Down

0 comments on commit c2e21b9

Please sign in to comment.