Skip to content

Commit

Permalink
fix(pre-commit.ci): auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent 21f9c75 commit 4447e35
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
10 changes: 0 additions & 10 deletions srai/embedders/_pytorch_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,21 @@
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."""

class Module:
"""Pytorch nn.Module class stub."""

...


class torch: # pragma: no cover
"""Pytorch class stub."""

...
2 changes: 1 addition & 1 deletion srai/h3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion srai/loaders/osm_loaders/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion srai/loaders/osm_loaders/filters/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tests/loaders/osm_loaders/test_osm_tile_data_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 4447e35

Please sign in to comment.