From f421c19015d61c7c96f6da2691650d2267821de6 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 9 Jan 2025 21:26:35 +0200 Subject: [PATCH] pyproject: use strict typing for everyone --- .github/workflows/ci.yml | 2 +- pyproject.toml | 25 +++++-------------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e215ac0..0c6fdd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: . ./ci-support-v0 build_py_project_in_venv - python -m mypy codepy + python -m mypy codepy test examples docs: name: Documentation diff --git a/pyproject.toml b/pyproject.toml index 44519bd..2fd00e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,10 +25,12 @@ classifiers = [ "Topic :: Utilities", ] dependencies = [ + "cgen>=2020.1", "numpy>=1.6", - "pytools>=2022.1.14", "platformdirs>=2.2.0", - "cgen>=2020.1" + "pytools>=2022.1.14", + # NOTE: for Self (requires python >=3.11) + "typing-extensions>=4.5", ] [project.optional-dependencies] @@ -88,23 +90,6 @@ warn_unused_ignores = true [[tool.mypy.overrides]] module = [ - "cgen.*", + "pycuda.*", ] ignore_missing_imports = true - -[[tool.mypy.overrides]] -module = [ - "codepy.bpl", - "codepy.elementwise", - "codepy.cuda", -] -# NOTE: the strict option is global, the checks must be disabled one by one -warn_unused_ignores = false -check_untyped_defs = false -allow_subclassing_any = true -allow_any_generics = true -allow_untyped_calls = true -allow_incomplete_defs = true -allow_untyped_defs = true -implicit_reexport = true -warn_return_any = false