From b0ede5605ddf91b859ebb78b3ce1404b45d11142 Mon Sep 17 00:00:00 2001 From: jackwotherspoon Date: Fri, 26 Jan 2024 16:39:26 +0000 Subject: [PATCH 1/4] chore: have mypy import stub libraries by default --- .github/workflows/lint.yml | 2 +- mypy.ini | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 mypy.ini diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 521319f..7358c11 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -51,4 +51,4 @@ jobs: isort --check . - name: Run type-check - run: mypy . + run: mypy --install-types --non-interactive . diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..797933d --- /dev/null +++ b/mypy.ini @@ -0,0 +1,2 @@ +[mypy] +python_version = 3.11 From 6948215a904bc7916f146c169a92e0ce49ece100 Mon Sep 17 00:00:00 2001 From: jackwotherspoon Date: Fri, 26 Jan 2024 16:44:37 +0000 Subject: [PATCH 2/4] chore: ignore synthtool mypy error --- mypy.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mypy.ini b/mypy.ini index 797933d..1d0479f 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,2 +1,5 @@ [mypy] python_version = 3.11 + +[mypy-synthtool] +ignore_missing_imports = True From 06e0f91d9f37ae71e82a983e64801cd707e010ac Mon Sep 17 00:00:00 2001 From: jackwotherspoon Date: Fri, 26 Jan 2024 16:59:07 +0000 Subject: [PATCH 3/4] chore: set mypy to min supported version --- mypy.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index 1d0479f..91a9e18 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,5 +1,5 @@ [mypy] -python_version = 3.11 +python_version = 3.8 [mypy-synthtool] ignore_missing_imports = True From f212edaf983b8b4433eda913848e1b2977cb9ef9 Mon Sep 17 00:00:00 2001 From: jackwotherspoon Date: Fri, 26 Jan 2024 19:09:17 +0000 Subject: [PATCH 4/4] chore: use pyproject.toml --- mypy.ini | 5 ----- pyproject.toml | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 91a9e18..0000000 --- a/mypy.ini +++ /dev/null @@ -1,5 +0,0 @@ -[mypy] -python_version = 3.8 - -[mypy-synthtool] -ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index bde45a0..827c703 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,8 +35,8 @@ build-backend = "setuptools.build_meta" profile = "black" [tool.mypy] -python_version = "3.11" +python_version = "3.8" warn_unused_configs = true exclude = [ "owlbot.py" -] \ No newline at end of file +]