From 82634b7bcaf69dcdd206240a8aa740b04bcfc493 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 27 Dec 2024 20:28:36 +0200 Subject: [PATCH] pyproject: remove mypy ignores --- .github/workflows/ci.yml | 3 ++- .gitlab-ci.yml | 3 +-- loopy/options.py | 2 +- pyproject.toml | 11 +++-------- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e328acb..85e0336b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,10 +50,11 @@ jobs: - uses: actions/checkout@v4 - name: "Main Script" run: | + EXTRA_INSTALL="mypy pytest types-colorama types-Pygments" curl -L -O https://tiker.net/ci-support-v0 . ./ci-support-v0 + build_py_project_in_conda_env - python -m pip install mypy ./run-mypy.sh pytest: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c314752..9cd13dd5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -158,11 +158,10 @@ Ruff: Mypy: script: | - EXTRA_INSTALL="pybind11 numpy" + EXTRA_INSTALL="mypy pybind11 numpy types-colorama types-Pygments" curl -L -O https://tiker.net/ci-support-v0 . ./ci-support-v0 build_py_project_in_venv - python -m pip install mypy ./run-mypy.sh tags: - python3 diff --git a/loopy/options.py b/loopy/options.py index 9996bb11..d9547c84 100644 --- a/loopy/options.py +++ b/loopy/options.py @@ -227,7 +227,7 @@ class Options(ImmutableRecord): kwargs = _apply_legacy_map(self._legacy_options_map, kwargs) try: - import colorama # noqa + import colorama # noqa: F401 except ImportError: allow_terminal_colors_def = False else: diff --git a/pyproject.toml b/pyproject.toml index 88a2e3cb..d61564a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,17 +168,12 @@ module = [ [[tool.mypy.overrides]] module = [ + "IPython.*", + "fparser.*", "islpy.*", - "pymbolic.*", - "genpy.*", - "pyopencl.*", - "colorama.*", - "codepy.*", "mako.*", - "fparser.*", "ply.*", - "pygments.*", - "IPython.*", + "pyopencl.*", ] ignore_missing_imports = true -- GitLab