Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #106

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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