Skip to content

Commit 73f9881

Browse files
Remove Python 3.9 support (#468)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 948aa7d commit 73f9881

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.github/workflows/testing-and-deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ["3.9", "3.10", "3.11", "3.12"]
32+
python-version: ["3.10", "3.11", "3.12"]
3333
steps:
3434
- uses: actions/checkout@v4
3535
with:

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies = [
1919
]
2020
dynamic = ["readme", "version"]
2121
name = "scikit-gmsh"
22-
requires-python = '>=3.9'
22+
requires-python = '>=3.10'
2323

2424
[project.optional-dependencies]
2525
docs = [

src/skgmsh/__init__.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from pathlib import Path
77
import subprocess
88
from typing import TYPE_CHECKING
9-
from typing import Optional
109

1110
import gmsh
1211
import numpy as np
@@ -157,7 +156,7 @@ def delaunay_3d(
157156
if isinstance(target_sizes, float):
158157
target_sizes = [target_sizes] * edge_source.number_of_points
159158

160-
for i, (point, target_size) in enumerate(zip(points, target_sizes)):
159+
for i, (point, target_size) in enumerate(zip(points, target_sizes, strict=False)):
161160
id_ = i + 1
162161
gmsh.model.geo.add_point(point[0], point[1], point[2], target_size, id_)
163162

@@ -246,11 +245,11 @@ def frontal_delaunay_2d( # noqa: C901, PLR0912
246245
if isinstance(target_sizes, float):
247246
target_sizes = [target_sizes] * (len(edge_source.interiors) + 1)
248247

249-
for target_size, linearring in zip(target_sizes, [edge_source.exterior, *list(edge_source.interiors)]):
248+
for target_size, linearring in zip(target_sizes, [edge_source.exterior, *list(edge_source.interiors)], strict=False):
250249
sizes = [target_size] * (len(linearring.coords) - 1) if isinstance(target_size, float) else target_size
251250
coords = linearring.coords[:-1].copy()
252251
tags = []
253-
for size, coord in zip(sizes, coords):
252+
for size, coord in zip(sizes, coords, strict=False):
254253
x, y, z = coord
255254
tags.append(gmsh.model.geo.add_point(x, y, z, size))
256255
curve_tags = []
@@ -269,7 +268,7 @@ def frontal_delaunay_2d( # noqa: C901, PLR0912
269268
target_sizes = [target_sizes] * edge_source.number_of_points
270269

271270
embedded_points = []
272-
for target_size, point in zip(target_sizes, points):
271+
for target_size, point in zip(target_sizes, points, strict=False):
273272
embedded_points.append(gmsh.model.geo.add_point(point[0], point[1], point[2], target_size))
274273

275274
for i in range(lines[0] - 1):
@@ -334,7 +333,7 @@ def generate_mesh(dim: int) -> pv.UnstructuredGrid:
334333
# Cells
335334
cells = {}
336335

337-
for type_, tags, node_tags in zip(element_types, element_tags, element_node_tags):
336+
for type_, tags, node_tags in zip(element_types, element_tags, element_node_tags, strict=False):
338337
assert (np.diff(tags) > 0).all() # noqa: S101
339338

340339
celltype = gmsh_to_pyvista_type[type_]
@@ -498,7 +497,7 @@ def cell_size(self: Delaunay3D, size: int) -> None:
498497
class Delaunay2D2:
499498
"""Delaunay2D class."""
500499

501-
def __init__(self, shell: shapely.Polygon, holes: Optional[list[shapely.Polygon]] = None) -> None:
500+
def __init__(self, shell: shapely.Polygon, holes: list[shapely.Polygon] | None = None) -> None:
502501
"""Create a Delaunay2D object."""
503502
self.shell = shapely.Polygon(shell)
504503
self.holes = [shapely.Polygon(hole) for hole in holes] if holes else []

0 commit comments

Comments
 (0)