Use stable mypy (#5595)

Use stable mypy

Pin all package versions

Don't upgrade pip itself
This commit is contained in:
Sebastian Rittau
2021-06-09 11:27:45 +02:00
committed by GitHub
parent 4edbeff5cc
commit c601d5cf3d
4 changed files with 16 additions and 30 deletions

View File

@@ -27,9 +27,7 @@ jobs:
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install -U pip
pip install git+https://github.com/hauntsaninja/mypy_primer.git
run: pip install git+https://github.com/hauntsaninja/mypy_primer.git
- name: Run mypy_primer
shell: bash
run: |
@@ -44,7 +42,7 @@ jobs:
# fail action if exit code isn't zero or one
(
mypy_primer \
--new 61c346230cf4960c976 --old 61c346230cf4960c976 \
--new v0.901 --old v0.901 \
--custom-typeshed-repo typeshed_to_test \
--new-typeshed $GITHUB_SHA --old-typeshed upstream_master \
--num-shards 2 --shard-index ${{ matrix.shard-index }} \

View File

@@ -25,11 +25,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Keep the mypy version in sync with what we use for stubtest in tests.yml
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U git+git://github.com/python/mypy@master
run: pip install $(grep mypy== requirements-tests-py3.txt)
- name: Run stubtest
shell: bash
run: ./tests/stubtest_unused.py | tee stubtest-output-${{ matrix.os }}-${{ matrix.python-version }}

View File

@@ -14,9 +14,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install toml
./tests/check_consistent.py
- run: pip install toml
- run: ./tests/check_consistent.py
flake8:
name: Lint with flake8
@@ -24,9 +23,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install $(grep flake8 requirements-tests-py3.txt)
flake8
- run: pip install $(grep flake8 requirements-tests-py3.txt)
- run: flake8
black:
name: Check formatting with black
@@ -34,9 +32,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install $(grep black requirements-tests-py3.txt)
black --check --diff stdlib stubs
- run: pip install $(grep black requirements-tests-py3.txt)
- run: black --check --diff stdlib stubs
isort:
name: Check imports with isort
@@ -44,9 +41,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install $(grep isort requirements-tests-py3.txt)
isort --check-only --diff stdlib stubs
- run: pip install $(grep isort requirements-tests-py3.txt)
- run: isort --check-only --diff stdlib stubs
pytype:
name: Run pytype against the stubs
@@ -69,7 +65,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install -U git+git://github.com/python/mypy
- run: pip install $(grep mypy== requirements-tests-py3.txt)
- run: ./tests/mypy_test.py --platform=${{ matrix.platform }}
pyright:
@@ -104,10 +100,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Keep the mypy version in sync with what we use for stubtest in stubtest-unused-whitelist.yml
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U git+git://github.com/python/mypy@master
run: pip install $(grep mypy== requirements-tests-py3.txt)
- name: Run stubtest
run: python tests/stubtest_test.py --ignore-unused-whitelist

View File

@@ -1,10 +1,8 @@
# Use the current mypy version until a version that supports modular
# typeshed is released on PyPI.
git+https://github.com/python/mypy.git@master
typed-ast>=1.0.4
mypy==0.901
typed-ast==1.4.3
black==21.5b2
flake8==3.9.2
flake8-bugbear==21.4.3
flake8-pyi==20.10.0
isort==5.8.0
pytype>=2021.5.25
pytype==2021.5.25