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
This commit is contained in:
Alex Waygood
2022-06-22 15:08:56 +01:00
committed by GitHub
parent a527bf27d5
commit 09141ec3dc
2 changed files with 2 additions and 2 deletions

View File

@@ -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
```

View File

@@ -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)")