Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
abarciauskas-bgse committed Jun 3, 2024
1 parent 0d35cf5 commit 829c39c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/test_asset_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from rio_tiler.io import Reader
from rio_tiler.models import ImageData

from titiler.stacapi.models import AssetInfo
from titiler.stacapi.asset_reader import AssetReader
from titiler.stacapi.models import AssetInfo
from titiler.stacapi.xarray import XarrayReader

from .conftest import mock_rasterio_open
Expand Down Expand Up @@ -39,6 +39,7 @@ def test_get_reader_netcdf():
empty_stac_reader = AssetReader({})
assert empty_stac_reader._get_reader(asset_info) == XarrayReader


@patch("rio_tiler.io.rasterio.rasterio")
def test_tile_cog(rio):
"""Test tile function with COG asset."""
Expand Down
7 changes: 4 additions & 3 deletions titiler/stacapi/asset_reader.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""titiler-stacapi custom STACReader."""
"""titiler-stacapi Asset Reader."""

import warnings
from typing import Any, Dict, Optional, Sequence, Set, Type, Union

import attr
import rasterio
from morecantile import TileMatrixSet
from rio_tiler.constants import WEB_MERCATOR_TMS, WGS84_CRS
from rio_tiler.constants import WEB_MERCATOR_TMS
from rio_tiler.errors import (
AssetAsBandError,
ExpressionMixingWarning,
Expand Down Expand Up @@ -49,6 +49,7 @@ class AssetReader(MultiBaseReader):
Asset reader for STAC items.
"""

input: Any = attr.ib()
tms: TileMatrixSet = attr.ib(default=WEB_MERCATOR_TMS)
minzoom: int = attr.ib()
maxzoom: int = attr.ib()
Expand Down Expand Up @@ -91,7 +92,7 @@ def _get_asset_info(self, asset: str) -> AssetInfo:
asset (str): asset name.
Returns:
AssetInfo: STAC asset info
AssetInfo: Asset info
"""
if asset not in self.assets:
Expand Down
2 changes: 1 addition & 1 deletion titiler/stacapi/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from rio_tiler.types import BBox
from urllib3 import Retry

from titiler.stacapi.settings import CacheSettings, RetrySettings, STACSettings
from titiler.stacapi.asset_reader import AssetReader
from titiler.stacapi.settings import CacheSettings, RetrySettings, STACSettings
from titiler.stacapi.utils import Timer

cache_config = CacheSettings()
Expand Down

0 comments on commit 829c39c

Please sign in to comment.