From 09141ec3dcdbc63549a5508a36b99483bda16d0f Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 22 Jun 2022 15:08:56 +0100 Subject: [PATCH] mypy_test.py: Fix argument-parsing for `--python-version` (#8134) * mypy_test.py: Fix argument-parsing for `--python-version` * Bump min version required in the README --- tests/README.md | 2 +- tests/mypy_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/README.md b/tests/README.md index cb37f171e..85c3039f3 100644 --- a/tests/README.md +++ b/tests/README.md @@ -17,7 +17,7 @@ in the `CONTRIBUTING.md` document. In particular, we recommend running with Pyth ## mypy\_test.py -This test requires Python 3.7+. Run using: +This test requires Python 3.8+. Run using: ``` (.venv3)$ python3 tests/mypy_test.py ``` diff --git a/tests/mypy_test.py b/tests/mypy_test.py index 9a5908514..3858376c1 100755 --- a/tests/mypy_test.py +++ b/tests/mypy_test.py @@ -36,7 +36,7 @@ parser = argparse.ArgumentParser(description="Test runner for typeshed. Patterns parser.add_argument("-v", "--verbose", action="count", default=0, help="More output") parser.add_argument("-n", "--dry-run", action="store_true", help="Don't actually run mypy") parser.add_argument("-x", "--exclude", type=str, nargs="*", help="Exclude pattern") -parser.add_argument("-p", "--python-version", type=str, nargs="*", help="These versions only (major[.minor])") +parser.add_argument("-p", "--python-version", type=str, nargs="*", action="extend", help="These versions only (major[.minor])") parser.add_argument("--platform", help="Run mypy for a certain OS platform (defaults to sys.platform)") parser.add_argument("filter", type=str, nargs="*", help="Include pattern (default all)")