diff --git a/rio_tiler/utils.py b/rio_tiler/utils.py index 5c98fa1a..0b775c78 100644 --- a/rio_tiler/utils.py +++ b/rio_tiler/utils.py @@ -791,7 +791,7 @@ def cast_to_sequence(val: Optional[Any] = None) -> Sequence: return val -def CRS_to_info(crs: pyproj.CRS) -> Optional[tuple[str, str, str]]: +def CRS_to_info(crs: CRS) -> Optional[tuple[str, str, str]]: """Convert CRS to URI. Code adapted from https://github.com/developmentseed/morecantile/blob/1829fe12408e4a1feee7493308f3f02257ef4caf/morecantile/models.py#L148-L161 @@ -809,7 +809,7 @@ def CRS_to_info(crs: pyproj.CRS) -> Optional[tuple[str, str, str]]: return None -def CRS_to_uri(crs: pyproj.CRS) -> Optional[str]: +def CRS_to_uri(crs: CRS) -> Optional[str]: """Convert CRS to URI.""" if authority_version_code := CRS_to_info(crs): authority, version, code = authority_version_code @@ -817,7 +817,7 @@ def CRS_to_uri(crs: pyproj.CRS) -> Optional[str]: return None -def CRS_to_urn(crs: pyproj.CRS) -> Optional[str]: +def CRS_to_urn(crs: CRS) -> Optional[str]: """Convert CRS to URN.""" if authority_version_code := CRS_to_info(crs): authority, version, code = authority_version_code