From fb5e931c2b0fcb67435dfc8822fc9a11b102deb5 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 5 Feb 2024 08:23:02 +0000 Subject: [PATCH 1/2] ruff updates --- python/dolfinx/mesh.py | 2 +- python/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/dolfinx/mesh.py b/python/dolfinx/mesh.py index 12c2f1d2b41..6a64d9d2935 100644 --- a/python/dolfinx/mesh.py +++ b/python/dolfinx/mesh.py @@ -385,7 +385,7 @@ def create_mesh(comm: _MPI.Comm, cells: npt.NDArray[np.int64], x: npt.NDArray[np try: mesh = _cpp.mesh.create_mesh(comm, cells, cmap._cpp_object, x, partitioner) except TypeError: - mesh = _cpp.mesh.create_mesh(comm, _cpp.graph.AdjacencyList_int64(np.cast['int64'](cells)), + mesh = _cpp.mesh.create_mesh(comm, _cpp.graph.AdjacencyList_int64(np.asarray(cells, dtype=np.int64)), cmap._cpp_object, x, partitioner) return Mesh(mesh, domain) diff --git a/python/pyproject.toml b/python/pyproject.toml index c2c109b9dca..7f2d58097d7 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -90,7 +90,6 @@ sections = [ [tool.ruff] line-length = 120 indent-width = 4 -allowed-confusables = ["σ"] [tool.ruff.lint] select = [ @@ -105,3 +104,4 @@ select = [ "FLY", # use f-string not static joins ] ignore = ["UP007", "RUF012"] +allowed-confusables = ["σ"] From 2b9d038772799e15eaf9ee076c38155d67cc1a2c Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 5 Feb 2024 08:25:28 +0000 Subject: [PATCH 2/2] ruff update --- python/doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/doc/source/conf.py b/python/doc/source/conf.py index 5206ddbcf57..99e5ae94e4a 100644 --- a/python/doc/source/conf.py +++ b/python/doc/source/conf.py @@ -10,7 +10,7 @@ sys.path.insert(0, os.path.abspath(".")) -import jupytext_process # noqa +import jupytext_process myst_heading_anchors = 3