Skip to content

Commit

Permalink
Enable ruf005
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Aug 14, 2024
1 parent 6a596c4 commit 2d508a4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ ignore = [
"PLR091", # Too many arguments/branches/statements
"PLR2004", # Magic value used in comparison
"PLW2901", # `for` loop variable is overwritten
"RUF005", # Consider {expr} instead of concatenation
"RUF012", # Mutable class attributes should use `typing.ClassVar`
]
extend-unsafe-fixes = [
Expand Down
2 changes: 1 addition & 1 deletion spatialpandas/geometry/baselist.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def buffer_offsets(self):
for i in range(3, len(buffers) - 1, 2)
)

return (offsets1,) + remaining_offsets
return (offsets1, *remaining_offsets)

@property
def flat_values(self):
Expand Down
2 changes: 1 addition & 1 deletion spatialpandas/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def _perform_read_parquet_dask(
div_maxes = partitions_df.div_maxes

if load_divisions:
divisions = div_mins + [div_maxes[-1]]
divisions = [*div_mins, div_maxes[-1]]
if divisions != sorted(divisions):
raise ValueError(
"Cannot load divisions because the discovered divisions are unsorted.\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_points_intersects_multipoint(gp_points, gp_multipoint):
sg_multipoint = gp_multipoint[0]
if len(gp_points) > 0:
# Add gp_point to gp_multipoints so we know something will intersect
gp_points = from_shapely(list(gp_points) + [gp_multipoint[0].geoms[-1]])
gp_points = from_shapely([*gp_points, gp_multipoint[0].geoms[-1]])

# Compute expected intersection
expected = gp_points.intersects(sg_multipoint)
Expand Down

0 comments on commit 2d508a4

Please sign in to comment.