Skip to content

Commit 86878e1

Browse files
committed
modern typing
1 parent 52a0483 commit 86878e1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

pygalmesh/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
from __future__ import annotations
2+
13
import math
24
import os
35
import tempfile
4-
from typing import Tuple
56

67
import meshio
78
import numpy
@@ -29,7 +30,7 @@ def eval(self, x):
2930

3031
def generate_mesh(
3132
domain,
32-
extra_feature_edges=None,
33+
extra_feature_edges: list | None = None,
3334
bounding_sphere_radius: float = 0.0,
3435
lloyd: bool = False,
3536
odt: bool = False,
@@ -383,7 +384,7 @@ def remesh_surface(
383384
return mesh
384385

385386

386-
def save_inr(vol, voxel_size: Tuple[float, float, float], fname: str):
387+
def save_inr(vol, voxel_size: tuple[float, float, float], fname: str):
387388
"""
388389
Save a volume (described as a numpy array) to INR format.
389390
Code inspired by iso2mesh (http://iso2mesh.sf.net) by Q. Fang
@@ -427,7 +428,7 @@ def save_inr(vol, voxel_size: Tuple[float, float, float], fname: str):
427428

428429
def generate_from_array(
429430
vol,
430-
voxel_size: Tuple[float, float, float],
431+
voxel_size: tuple[float, float, float],
431432
lloyd: bool = False,
432433
odt: bool = False,
433434
perturb: bool = True,

0 commit comments

Comments
 (0)