Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#106)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.6.9](astral-sh/ruff-pre-commit@v0.5.0...v0.6.9)

* Fix code suggestions for ruff

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mike Taves <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and mwtoews authored Oct 9, 2024
1 parent 0b50383 commit 9665610
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.6.9
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion swn/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __eq__(self, other):
is_none = (av is None, bv is None)
if all(is_none):
continue
elif any(is_none) or type(av) != type(bv):
elif any(is_none) or type(av) is not type(bv):
return False
elif isinstance(av, pd.DataFrame):
pd.testing.assert_frame_equal(av, bv)
Expand Down
2 changes: 1 addition & 1 deletion swn/modflow/_swnmf6.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def __eq__(self, other):
is_none = (av is None, bv is None)
if all(is_none):
continue
elif any(is_none) or type(av) != type(bv):
elif any(is_none) or type(av) is not type(bv):
return False
elif isinstance(av, pd.DataFrame):
pd.testing.assert_frame_equal(av, bv)
Expand Down
2 changes: 1 addition & 1 deletion swn/modflow/_swnmodflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def __eq__(self, other):
is_none = (av is None, bv is None)
if all(is_none):
continue
elif any(is_none) or type(av) != type(bv):
elif any(is_none) or type(av) is not type(bv):
return False
elif isinstance(av, pd.DataFrame):
pd.testing.assert_frame_equal(av, bv)
Expand Down
12 changes: 6 additions & 6 deletions tests/test_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ def test_wkt_to_dataframe():
df = spatial.wkt_to_dataframe(valid_lines_list)
assert df.shape == (3, 1)
assert df.dtypes.to_dict() == {"geometry": np.dtype("O")}
assert type(df) == pd.DataFrame
assert type(df) is pd.DataFrame
pd.testing.assert_index_equal(df.index, pd.RangeIndex(3))

with pytest.deprecated_call():
df = spatial.wkt_to_dataframe(valid_lines_list, "other")
assert df.shape == (3, 1)
assert df.dtypes.to_dict() == {"other": np.dtype("O")}
assert type(df) == pd.DataFrame
assert type(df) is pd.DataFrame
pd.testing.assert_index_equal(df.index, pd.RangeIndex(3))


Expand All @@ -126,14 +126,14 @@ def test_wkt_to_geodataframe():
gdf = spatial.wkt_to_geodataframe(valid_lines_list)
assert gdf.shape == (3, 1)
assert list(gdf.columns) == ["geometry"]
assert type(gdf) == geopandas.GeoDataFrame
assert type(gdf) is geopandas.GeoDataFrame
pd.testing.assert_series_equal(gdf.is_valid, pd.Series([True] * 3))

with pytest.deprecated_call():
gdf = spatial.wkt_to_geodataframe(valid_lines_list, "other")
assert gdf.shape == (3, 1)
assert list(gdf.columns) == ["other"]
assert type(gdf) == geopandas.GeoDataFrame
assert type(gdf) is geopandas.GeoDataFrame
pd.testing.assert_series_equal(gdf.is_valid, pd.Series([True] * 3))


Expand All @@ -142,14 +142,14 @@ def test_wkt_to_geoseries():
gs = spatial.wkt_to_geoseries(valid_lines_list)
assert gs.shape == (3,)
assert gs.name is None
assert type(gs) == geopandas.GeoSeries
assert type(gs) is geopandas.GeoSeries
pd.testing.assert_series_equal(gs.is_valid, pd.Series([True] * 3))

with pytest.deprecated_call():
gs = spatial.wkt_to_geoseries(valid_lines_list, "other")
assert gs.shape == (3,)
assert gs.name == "other"
assert type(gs) == geopandas.GeoSeries
assert type(gs) is geopandas.GeoSeries
pd.testing.assert_series_equal(gs.is_valid, pd.Series([True] * 3))


Expand Down

0 comments on commit 9665610

Please sign in to comment.