From fdfaa79053fce7b3e8ef1b2c67c33e6c63490c47 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 14 Oct 2024 17:05:51 +0100 Subject: [PATCH] Expose type checking dependencies into an extra This will allow to add tox to mypre_primer so new versions of mypy will be tested against it. It should also make it easier to do type checking for plugin developers. --- pyproject.toml | 5 +++++ tox.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 50142c5b2d..3ecfd0e500 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,6 +92,11 @@ optional-dependencies.testing = [ "time-machine>=2.15; implementation_name!='pypy'", "wheel>=0.44", ] +optional-dependencies.type = [ + "mypy==1.11.2", + "types-cachetools>=5.5.0.20240820", + "types-chardet>=5.0.4.6", +] urls.Documentation = "https://tox.wiki" urls.Homepage = "http://tox.readthedocs.org" urls."Release Notes" = "https://tox.wiki/en/latest/changelog.html" diff --git a/tox.toml b/tox.toml index 56b45735a4..7c288460a7 100644 --- a/tox.toml +++ b/tox.toml @@ -56,7 +56,7 @@ commands = [["pre-commit", "run", "--all-files", "--show-diff-on-failure", { rep [env.type] description = "run type check on code base" -deps = ["mypy==1.11.2", "types-cachetools>=5.5.0.20240820", "types-chardet>=5.0.4.6"] +extras = ["testing", "type"] commands = [["mypy", "src{/}tox"], ["mypy", "tests"]] [env.docs]