Skip to content

Commit

Permalink
Update flake8 to 7.1.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Sep 17, 2024
1 parent 3df7128 commit 250133b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
# Explicitly specify the pyproject.toml at the repo root, not per-project.
args: ["--config", "pyproject.toml"]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 7.1.1
hooks:
- id: flake8
args: ["--config=.flake8"]
Expand Down
10 changes: 5 additions & 5 deletions python/cuspatial/cuspatial/tests/test_geodataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def generator(size, has_z=False):


def assert_eq_point(p1, p2):
assert type(p1) == type(p2)
assert type(p1) is type(p2)
assert p1.x == p2.x
assert p1.y == p2.y
assert p1.has_z == p2.has_z
Expand All @@ -76,7 +76,7 @@ def assert_eq_point(p1, p2):


def assert_eq_multipoint(p1, p2):
assert type(p1) == type(p2)
assert type(p1) is type(p2)
assert len(p1) == len(p2)
for i in range(len(p1)):
assert_eq_point(p1[i], p2[i])
Expand All @@ -93,8 +93,8 @@ def assert_eq_multipolygon(p1, p2):


def assert_eq_geo_df(geo1, geo2):
if type(geo1) != type(geo2):
assert TypeError
if type(geo1) is not type(geo2):
raise TypeError
assert geo1.columns.equals(geo2.columns)
for col in geo1.columns:
if geo1[col].dtype == "geometry":
Expand All @@ -112,7 +112,7 @@ def test_select_multiple_columns(gpdf):

def test_type_persistence(gpdf):
cugpdf = cuspatial.from_geopandas(gpdf)
assert type(cugpdf["geometry"]) == cuspatial.GeoSeries
assert type(cugpdf["geometry"]) is cuspatial.GeoSeries


def test_interleaved_point(gpdf, polys):
Expand Down
10 changes: 5 additions & 5 deletions python/cuspatial/cuspatial/tests/test_geoseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def generator(size: Integral, obj_type: Example_Feature_Enum = None):


def assert_eq_point(p1, p2):
assert type(p1) == type(p2)
assert type(p1) is type(p2)
assert p1.x == p2.x
assert p1.y == p2.y
assert p1.has_z == p2.has_z
Expand All @@ -97,14 +97,14 @@ def assert_eq_point(p1, p2):


def assert_eq_multipoint(p1, p2):
assert type(p1) == type(p2)
assert type(p1) is type(p2)
assert len(p1) == len(p2)
for i in range(len(p1)):
assert_eq_point(p1[i], p2[i])


def assert_eq_linestring(p1, p2):
assert type(p1) == type(p2)
assert type(p1) is type(p2)
assert p1 == p2


Expand All @@ -124,8 +124,8 @@ def assert_eq_multipolygon(p1, p2):


def assert_eq_geo(geo1, geo2):
if type(geo1) != type(geo2):
assert TypeError
if type(geo1) is not type(geo2):
raise TypeError
result = geo1.equals(geo2)
if isinstance(result, bool):
assert result
Expand Down

0 comments on commit 250133b

Please sign in to comment.