diff --git a/srai/embedders/_pytorch_stubs.py b/srai/embedders/_pytorch_stubs.py index 2d7e1189..747bae53 100644 --- a/srai/embedders/_pytorch_stubs.py +++ b/srai/embedders/_pytorch_stubs.py @@ -6,20 +6,14 @@ class Dataset(Generic[T_co]): """Dataset class stub.""" - ... - class DataLoader(Generic[T_co]): """DataLoader class stub.""" - ... - class LightningModule: # pragma: no cover """LightningModule class stub.""" - ... - class nn: # pragma: no cover """Pytorch nn class stub.""" @@ -27,10 +21,6 @@ class nn: # pragma: no cover class Module: """Pytorch nn.Module class stub.""" - ... - class torch: # pragma: no cover """Pytorch class stub.""" - - ... diff --git a/srai/h3.py b/srai/h3.py index 19888612..ca4f64a9 100644 --- a/srai/h3.py +++ b/srai/h3.py @@ -103,7 +103,7 @@ def h3_to_shapely_geometry(h3_index: Iterable[Union[int, str]]) -> list[Polygon] # TODO: write tests (#322) def h3_to_shapely_geometry( - h3_index: Union[int, str, Iterable[Union[int, str]]] + h3_index: Union[int, str, Iterable[Union[int, str]]], ) -> Union[Polygon, list[Polygon]]: """ Convert H3 index to Shapely polygon. diff --git a/srai/loaders/osm_loaders/_base.py b/srai/loaders/osm_loaders/_base.py index 05f79f89..320e8b2e 100644 --- a/srai/loaders/osm_loaders/_base.py +++ b/srai/loaders/osm_loaders/_base.py @@ -17,7 +17,7 @@ def prepare_area_gdf_for_loader( - area: Union[BaseGeometry, Iterable[BaseGeometry], gpd.GeoSeries, gpd.GeoDataFrame] + area: Union[BaseGeometry, Iterable[BaseGeometry], gpd.GeoSeries, gpd.GeoDataFrame], ) -> gpd.GeoDataFrame: """ Prepare an area for the loader. diff --git a/srai/loaders/osm_loaders/filters/_typing.py b/srai/loaders/osm_loaders/filters/_typing.py index 167fea2b..8fade0b2 100644 --- a/srai/loaders/osm_loaders/filters/_typing.py +++ b/srai/loaders/osm_loaders/filters/_typing.py @@ -29,7 +29,7 @@ def merge_osm_tags_filter(osm_tags_filter: Iterable[GroupedOsmTagsFilter]) -> Os def merge_osm_tags_filter( osm_tags_filter: Union[ OsmTagsFilter, GroupedOsmTagsFilter, Iterable[OsmTagsFilter], Iterable[GroupedOsmTagsFilter] - ] + ], ) -> OsmTagsFilter: """ Merge OSM tags filter into `OsmTagsFilter` type. diff --git a/tests/loaders/osm_loaders/test_osm_tile_data_collector.py b/tests/loaders/osm_loaders/test_osm_tile_data_collector.py index 46fbc893..9fd89c78 100644 --- a/tests/loaders/osm_loaders/test_osm_tile_data_collector.py +++ b/tests/loaders/osm_loaders/test_osm_tile_data_collector.py @@ -73,7 +73,7 @@ def test_should_return_stored(self, col: collectors.InMemoryDataCollector) -> No "collector_type", [(collectors.DataCollectorType.RETURN), "return"] ) def test_in_memory_collector_creation( - collector_type: Union[str, collectors.DataCollectorType] + collector_type: Union[str, collectors.DataCollectorType], ) -> None: """Test if factory creates properly InMemoryDataCollector.""" created = collectors.get_collector(collector_type) @@ -85,7 +85,7 @@ def test_in_memory_collector_creation( "collector_type", [(collectors.DataCollectorType.SAVE), "save"] ) def test_saving_collector_creation( - collector_type: Union[str, collectors.DataCollectorType] + collector_type: Union[str, collectors.DataCollectorType], ) -> None: """Test if factory creates properly SavingDataCollector.""" created = collectors.get_collector(collector_type, save_path=PATH, file_extension=FILE_TYPE)