Skip to content

Commit

Permalink
pytype_runner: Check >3.11: pytype does not work with 3.12 and newer
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Kaindl <[email protected]>
  • Loading branch information
bernhardkaindl committed Nov 16, 2024
1 parent efd6a75 commit 381fb52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pytype_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 []
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 381fb52

Please sign in to comment.