From 1737b0711065be29dc0708638b7e01b56c0f7cde Mon Sep 17 00:00:00 2001 From: Francesco Ballarin Date: Wed, 1 Nov 2023 15:42:48 +0100 Subject: [PATCH] TMP temporary ignore --- pyproject.toml | 3 ++- rbnicsx/_cpp/compile_code.py | 4 ++-- rbnicsx/_cpp/default_compiler_options_with_dolfinx.py | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 06ffae1..cbb1ec8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules" ] dependencies = [ + "cppimport", "mpi4py", "numpy >= 1.21.0", "petsc4py", @@ -117,7 +118,7 @@ pretty = true show_error_codes = true strict = true warn_return_any = true -warn_unused_ignores = true +warn_unused_ignores = false [[tool.mypy.overrides]] module = "gmsh" diff --git a/rbnicsx/_cpp/compile_code.py b/rbnicsx/_cpp/compile_code.py index 4634866..83580a2 100644 --- a/rbnicsx/_cpp/compile_code.py +++ b/rbnicsx/_cpp/compile_code.py @@ -11,12 +11,12 @@ import types import typing -import cppimport +import cppimport # type: ignore import mpi4py import mpi4py.MPI import numpy import petsc4py -import pybind11 +import pybind11 # type: ignore import slepc4py from rbnicsx.io import on_rank_zero diff --git a/rbnicsx/_cpp/default_compiler_options_with_dolfinx.py b/rbnicsx/_cpp/default_compiler_options_with_dolfinx.py index 5a0f813..13d9bdf 100644 --- a/rbnicsx/_cpp/default_compiler_options_with_dolfinx.py +++ b/rbnicsx/_cpp/default_compiler_options_with_dolfinx.py @@ -7,15 +7,16 @@ import typing # pragma: no cover -import dolfinx.jit # pragma: no cover -import dolfinx.pkgconfig # pragma: no cover -import dolfinx.wrappers # pragma: no cover import numpy as np # pragma: no cover import petsc4py.PETSc # pragma: no cover def determine_default_compiler_options() -> typing.Dict[str, typing.Union[str, typing.List[str]]]: # pragma: no cover """Determine default compiler options when dolfinx is available.""" + import dolfinx.jit # pragma: no cover # noqa: IMR200 + import dolfinx.pkgconfig # pragma: no cover # noqa: IMR200 + import dolfinx.wrappers # pragma: no cover # noqa: IMR200 + default_compiler_options: typing.Dict[str, typing.Union[str, typing.List[str]]] = dict() # C++ components @@ -26,7 +27,7 @@ def determine_default_compiler_options() -> typing.Dict[str, typing.Union[str, t (True, not has_petsc_complex, has_petsc_complex) ): if dolfinx.pkgconfig.exists(dolfinx_pc_package) and scalar_type_check: - dolfinx_pc.update(dolfinx.pkgconfig.parse(dolfinx_pc_package)) # type: ignore[no-untyped-call] + dolfinx_pc.update(dolfinx.pkgconfig.parse(dolfinx_pc_package)) # type: ignore break assert len(dolfinx_pc) > 0 default_compiler_options["include_dirs"] = [