From b20e5b6c144eb858ceb7b9571909809a35a33cde Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 25 Jul 2019 16:43:52 +0200 Subject: [PATCH] Travis: run mypy with Python 3.8 as well (#3146) This runs mypy both with Python 3.7 and 3.8. In Python 3.8, mypy switched from using typed-ast to using Python's built-in ast. This patch ensures that both are tested. --- .travis.yml | 9 +++++++-- tests/mypy_test.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99a3c65d4..2d96621b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: xenial +dist: bionic language: python python: 3.7 @@ -9,7 +9,12 @@ matrix: env: - TEST_CMD="./tests/pytype_test.py" - INSTALL="test" - - name: "mypy" + - name: "mypy (typed-ast)" + env: + - TEST_CMD="./tests/mypy_test.py" + - INSTALL="mypy" + - name: "mypy (ast)" + python: 3.8-dev env: - TEST_CMD="./tests/mypy_test.py" - INSTALL="mypy" diff --git a/tests/mypy_test.py b/tests/mypy_test.py index d4ffca111..2d9119109 100755 --- a/tests/mypy_test.py +++ b/tests/mypy_test.py @@ -88,7 +88,7 @@ def main(): print("Cannot import mypy. Did you install it?") sys.exit(1) - versions = [(3, 7), (3, 6), (3, 5), (3, 4), (2, 7)] + versions = [(3, 8), (3, 7), (3, 6), (3, 5), (3, 4), (2, 7)] if args.python_version: versions = [v for v in versions if any(('%d.%d' % v).startswith(av) for av in args.python_version)]