diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 27b6e2eb..abff3fbd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.6.0" + rev: "v5.0.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -27,13 +27,13 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: "24.4.2" + rev: "24.10.0" hooks: - id: black args: [--line-length=79] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.4 + rev: v0.7.1 hooks: - id: ruff args: [ diff --git a/examples/export_meshio.py b/examples/export_meshio.py index 2e81b39d..7cbc241c 100644 --- a/examples/export_meshio.py +++ b/examples/export_meshio.py @@ -44,14 +44,14 @@ # Export with subgroup triangles gus.io.meshio.export( - tet, export_path / "export_meshio_subgroups.vtu", submeshes=[fac] + export_path / "export_meshio_subgroups.vtu", tet, submeshes=[fac] ) # The mesh still has to conform the needed format, e.g. stl will discard # tetrahedra gus.io.meshio.export( - tet, export_path / "export_meshio_subgroups.stl", submeshes=[fac] + export_path / "export_meshio_subgroups.stl", tet, submeshes=[fac] ) # Export only tetrahedra - gus.io.meshio.export(tet, export_path / "export_meshio.vtu") - gus.io.meshio.export(tet.to_faces(), export_path / "export_meshio.stl") + gus.io.meshio.export(export_path / "export_meshio.vtu", tet) + gus.io.meshio.export(export_path / "export_meshio.stl", tet.to_faces()) diff --git a/examples/ipynb/notebook_showcase_k3d.ipynb b/examples/ipynb/notebook_showcase_k3d.ipynb index 49650c67..e8139009 100644 --- a/examples/ipynb/notebook_showcase_k3d.ipynb +++ b/examples/ipynb/notebook_showcase_k3d.ipynb @@ -15,9 +15,10 @@ "metadata": {}, "outputs": [], "source": [ - "import gustaf as gus\n", "import vedo\n", "\n", + "import gustaf as gus\n", + "\n", "vedo.settings.default_backend = \"k3d\"" ] }, @@ -156,7 +157,9 @@ ")\n", "torus.control_points += [3, 0, 3]\n", "\n", - "empty_torus = splinepy.helpme.create.circle(1).create.revolved([0, 1, 0], [3, 0, 0], 360)\n" + "empty_torus = splinepy.helpme.create.circle(1).create.revolved(\n", + " [0, 1, 0], [3, 0, 0], 360\n", + ")\n" ] }, { diff --git a/examples/mixd_to_nutils.py b/examples/mixd_to_nutils.py index aea366bc..05c168db 100644 --- a/examples/mixd_to_nutils.py +++ b/examples/mixd_to_nutils.py @@ -8,8 +8,8 @@ def main(): mesh = create_mesh() # Export it as .mixd-file and .npz-file - gus.io.mixd.export(mesh, "export/export_mixd.xns") - gus.io.nutils.export(mesh, "export/export_npz.npz") + gus.io.mixd.export("export/export_mixd.xns", mesh) + gus.io.nutils.export("export/export_npz.npz", mesh) # Load the mixd-file and the .npz-file mesh_mixd = gus.io.mixd.load( diff --git a/gustaf/show.py b/gustaf/show.py index 89a54fe9..16378ca1 100644 --- a/gustaf/show.py +++ b/gustaf/show.py @@ -72,15 +72,15 @@ def show(*args, **kwargs): N = len(args) offs = kwargs.get("offscreen", False) interact = kwargs.get("interactive", True) - plt = kwargs.get("vedoplot", None) + plt = kwargs.get("vedoplot") skip_clear = kwargs.get("skip_clear", False) - close = kwargs.get("close", None) + close = kwargs.get("close") size = kwargs.get("size", "auto") - cam = kwargs.get("cam", None) + cam = kwargs.get("cam") title = kwargs.get("title", "gustaf") background = kwargs.get("background", "white") return_show_list = kwargs.get("return_showable_list", False) - axes = kwargs.get("axes", None) + axes = kwargs.get("axes") def clear_vedo_plotter(plotter, num_renderers, skip_cl=skip_clear): """enough said."""