Skip to content

Commit 381fb52

Browse files
pytype_runner: Check >3.11: pytype does not work with 3.12 and newer
Signed-off-by: Bernhard Kaindl <[email protected]>
1 parent efd6a75 commit 381fb52

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: pytype_runner.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import selectors
55
import shlex
66
import sys
7-
from logging import INFO, basicConfig, info
7+
from logging import INFO, basicConfig, info, fatal
88
from subprocess import PIPE, Popen
99
from typing import Dict, List, TextIO, Tuple
1010

@@ -150,6 +150,9 @@ def to_markdown(me, fp, returncode, results, branch_url):
150150

151151

152152
def setup_and_run_pytype_action(script_name: str):
153+
if sys.version_info > (3, 11):
154+
fatal("pytype does not yet work well enough when hosted on Python 3.12")
155+
sys.exit(5)
153156
config = load("pyproject.toml")
154157
pytype = config["tool"].get("pytype")
155158
xfail_files = pytype.get("xfail", []) if pytype else []

Diff for: tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# .github/workflows/main.yml is set up to test with 3.11, 3.12 and 3.13 in parallel.
1212
# Therefore, use three environments: One with 3.11, one with 3.12 and one with 3.13:
1313
#
14-
envlist = py311-covcp-check-mdreport, py312-cov-pytype, py313-cov-lint-pyright
14+
envlist = py311-covcp-check-pytype-mdreport, py312-cov, py313-cov-lint-pyright
1515
isolated_build = true
1616
skip_missing_interpreters = true
1717
requires =

0 commit comments

Comments
 (0)