diff --git a/pyproject.toml b/pyproject.toml index dbcd4f85..ceeaf124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -142,10 +142,6 @@ ignore = [ # https://docs.astral.sh/ruff/rules/#pandas-vet-pd "PD", - # Ruff-specific rules (RUF) - # https://docs.astral.sh/ruff/rules/collection-literal-concatenation/ - "RUF005", # Consider {expression} instead of concatenation. - # flake8-bandit (S) # https://docs.astral.sh/ruff/rules/assert/ "S101", # Use of assert detected. diff --git a/src/geovista/cli.py b/src/geovista/cli.py index 04997d7b..cba23ca8 100644 --- a/src/geovista/cli.py +++ b/src/geovista/cli.py @@ -40,7 +40,7 @@ FG_COLOUR: str = "cyan" -EXAMPLES: list[str] = [ALL] + get_modules("geovista.examples") +EXAMPLES: list[str] = [ALL, *get_modules("geovista.examples")] def _download_group( diff --git a/src/geovista/geodesic.py b/src/geovista/geodesic.py index 7e126676..9a32ed02 100644 --- a/src/geovista/geodesic.py +++ b/src/geovista/geodesic.py @@ -337,9 +337,11 @@ def bbox_update( npts=self._npts, geod=self._geod, ) - self._idx_map[row, column] = ( - [idx1] + list(np.arange(self._npts) + self._bbox_count) + [idx2] - ) + self._idx_map[row, column] = [ + idx1, + *(np.arange(self._npts) + self._bbox_count), + idx2, + ] bbox_extend(glons, glats) # register bbox edge indices, and points diff --git a/tests/search/test_KDTree.py b/tests/search/test_KDTree.py index f2bab262..e10c214d 100644 --- a/tests/search/test_KDTree.py +++ b/tests/search/test_KDTree.py @@ -103,7 +103,7 @@ def test_cell_neighbours(lam_uk, neighbours): kdtree = KDTree(lam_uk, preference="center") lonlat = from_cartesian(pv.PolyData(kdtree.points)) cid = neighbours.cid - expected = [cid] + neighbours.expected + expected = [cid, *neighbours.expected] k = len(expected) lon, lat = lonlat[cid][0], lonlat[cid][1] _, idx = kdtree.query(lon, lat, k=k) diff --git a/tests/transform/test_transform_points.py b/tests/transform/test_transform_points.py index 726ebe17..28dbc5d5 100644 --- a/tests/transform/test_transform_points.py +++ b/tests/transform/test_transform_points.py @@ -92,7 +92,7 @@ def test_transform(mocker, zoffset, reshape, roundtrip): zs = zs.reshape(shape) else: shape = (size,) - shape = shape + (3,) + shape = (*shape, 3) spy_from_crs = mocker.spy(Transformer, "from_crs") spy_transform = mocker.spy(Transformer, "transform") if roundtrip: