8000 Bump mypy to 1.5.1 by AlexWaygood · Pull Request #10559 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Bump mypy to 1.5.1 #10559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Bump mypy to 1.5
  • Loading branch information
AlexWaygood committed Aug 11, 2023
commit 82c04080c9b8da43180de2d22c04ff7cfafbaa59
12 changes: 1 addition & 11 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,18 @@ jobs:
matrix:
# tkinter doesn't import on macOS-12
os: ["ubuntu-latest", "windows-latest", "macos-11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
if: ${{ matrix.os != 'macos-11' || matrix.python-version != '3.7' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
# Handle the py37 run on macos differently,
# to workaround https://github.com/actions/setup-python/issues/682
- name: Setup Python 3.7.16 on macos
if: ${{ matrix.os == 'macos-11' && matrix.python-version == '3.7' }}
uses: actions/setup-python@v4
with:
python-version: "3.7.16"
cache: pip
cache-dependency-path: requirements-tests.txt
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Run stubtest
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/stubtest_stdlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,18 @@ jobs:
matrix:
# tkinter doesn't import on macOS 12
os: ["ubuntu-latest", "windows-latest", "macos-11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
if: ${{ matrix.os != 'macos-11' || matrix.python-version != '3.7' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
8000 cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
# Handle the py37 run on macos differently,
# to workaround https://github.com/actions/setup-python/issues/682
- name: Setup Python 3.7.16 on macos
if: ${{ matrix.os == 'macos-11' && matrix.python-version == '3.7' }}
uses: actions/setup-python@v4
with:
python-version: "3.7.16"
cache: pip
cache-dependency-path: requirements-tests.txt
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Run stubtest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
strategy:
matrix:
platform: ["linux", "win32", "darwin"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ flake8-bugbear==23.7.10; python_version >= "3.8" # must match .pre-commit-confi
flake8-noqa==1.3.2; python_version >= "3.8" # must match .pre-commit-config.yaml
flake8-pyi==23.6.0; python_version >= "3.8" # must match .pre-commit-config.yaml
isort==5.12.0; python_version >= "3.8" # must match .pre-commit-config.yaml
mypy==1.4.1
mypy==1.5
pre-commit-hooks==4.4.0 # must match .pre-commit-config.yaml
pytype==2023.7.21; platform_system != "Windows" and python_version >= "3.8" and python_version < "3.11"
ruff==0.0.280 # must match .pre-commit-config.yaml
Expand Down
17 changes: 1 addition & 16 deletions tests/mypy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
print_error("Cannot import mypy. Did you install it?")
sys.exit(1)

SUPPORTED_VERSIONS = ["3.12", "3.11", "3.10", "3.9", "3.8", "3.7"]
SUPPORTED_VERSIONS = ["3.12", "3.11", "3.10", "3.9", "3.8"]
SUPPORTED_PLATFORMS = ("linux", "win32", "darwin")
DIRECTORIES_TO_TEST = [Path("stdlib"), Path("stubs")]

Expand Down Expand Up @@ -86,21 +86,6 @@ def remove_dev_suffix(version: str) -> str:
parser = argparse.ArgumentParser(
description="Typecheck typeshed's stubs with mypy. Patterns are unanchored regexps on the full path."
)
if sys.version_info < (3, 8):

class ExtendAction(argparse.Action):
def __call__(
self,
parser: argparse.ArgumentParser,
namespace: argparse.Namespace,
values: Sequence[str],
option_string: object = None,
) -> None:
items = getattr(namespace, self.dest) or []
items.extend(values)
setattr(namespace, self.dest, items)

parser.register("action", "extend", ExtendAction)
parser.add_argument(
"filter",
type=valid_path,
Expand Down
8 changes: 0 additions & 8 deletions tests/stubtest_allowlists/darwin-py37.txt
6D40

This file was deleted.

8 changes: 0 additions & 8 deletions tests/stubtest_allowlists/linux-py37.txt

This file was deleted.

186 changes: 0 additions & 186 deletions tests/stubtest_allowlists/py37.txt

This file was deleted.

20 changes: 0 additions & 20 deletions tests/stubtest_allowlists/win32-py37.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def colored(text: str, color: str | None = None, **kwargs: Any) -> str: # type:


# A backport of functools.cache for Python <3.9
# This module is imported by mypy_test.py, which needs to run on 3.7 in CI
# This module is imported by mypy_test.py, which needs to run on 3.8 in CI
cache = lru_cache(None)


Expand Down
0