From 4a62af4ea2e689fde90c05ab71f5ee517ca7d985 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Fri, 15 Nov 2024 12:00:00 +0100 Subject: [PATCH] pytype_runner: Check >3.11: pytype does not work with 3.12 and newer Signed-off-by: Bernhard Kaindl --- pytype_runner.py | 5 ++++- tox.ini | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pytype_runner.py b/pytype_runner.py index 4bd59b59..88af57b4 100755 --- a/pytype_runner.py +++ b/pytype_runner.py @@ -4,7 +4,7 @@ import selectors import shlex import sys -from logging import INFO, basicConfig, info +from logging import INFO, basicConfig, info, fatal from subprocess import PIPE, Popen from typing import Dict, List, TextIO, Tuple @@ -150,6 +150,9 @@ def to_markdown(me, fp, returncode, results, branch_url): def setup_and_run_pytype_action(script_name: str): + if sys.version_info > (3, 11): + fatal("pytype does not yet work well enough when hosted on Python 3.12") + sys.exit(5) config = load("pyproject.toml") pytype = config["tool"].get("pytype") xfail_files = pytype.get("xfail", []) if pytype else [] diff --git a/tox.ini b/tox.ini index 0491f56e..87015904 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ # .github/workflows/main.yml is set up to test with 3.11, 3.12 and 3.13 in parallel. # Therefore, use three environments: One with 3.11, one with 3.12 and one with 3.13: # -envlist = py311-covcp-check-mdreport, py312-cov-pytype, py313-cov-lint-pyright +envlist = py311-covcp-check-pytype-mdreport, py312-cov, py313-cov-lint-pyright isolated_build = true skip_missing_interpreters = true requires =