diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index 4dc135778..ef8dc7ac7 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -33,7 +33,7 @@ jobs: shell: bash run: | cd typeshed_to_test - MYPY_VERSION=$(grep mypy== requirements-tests-py3.txt | cut -d = -f 3) + MYPY_VERSION=$(grep mypy== requirements-tests.txt | cut -d = -f 3) echo "new commit" git rev-list --format=%s --max-count=1 $GITHUB_SHA git checkout -b upstream_master origin/master diff --git a/.github/workflows/stubtest.yml b/.github/workflows/stubtest.yml index 82531452a..3c50f6382 100644 --- a/.github/workflows/stubtest.yml +++ b/.github/workflows/stubtest.yml @@ -31,7 +31,7 @@ jobs: - name: Update pip run: python -m pip install -U pip - name: Install dependencies - run: pip install $(grep tomli== requirements-tests-py3.txt) $(grep mypy== requirements-tests-py3.txt) + run: pip install $(grep tomli== requirements-tests.txt) $(grep mypy== requirements-tests.txt) - name: Run stubtest run: python tests/stubtest_stdlib.py @@ -49,6 +49,6 @@ jobs: with: python-version: 3.9 - name: Install dependencies - run: pip install $(grep tomli== requirements-tests-py3.txt) + run: pip install $(grep tomli== requirements-tests.txt) - name: Run stubtest run: python tests/stubtest_third_party.py --num-shards 4 --shard-index ${{ matrix.shard-index }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ead7bcf08..794d1669c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - run: pip install $(grep tomli== requirements-tests-py3.txt) + - run: pip install $(grep tomli== requirements-tests.txt) - run: ./tests/check_consistent.py new-syntax: @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - run: pip install $(grep flake8 requirements-tests-py3.txt) + - run: pip install $(grep flake8 requirements-tests.txt) - run: flake8 pytype: @@ -45,7 +45,7 @@ jobs: - uses: actions/setup-python@v2 with: python-version: 3.9 - - run: pip install -r requirements-tests-py3.txt + - run: pip install -r requirements-tests.txt - run: ./tests/pytype_test.py mypy: @@ -59,7 +59,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - run: pip install $(grep tomli== requirements-tests-py3.txt) $(grep mypy== requirements-tests-py3.txt) + - run: pip install $(grep tomli== requirements-tests.txt) $(grep mypy== requirements-tests.txt) - run: ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${{ matrix.python-version }} pyright: @@ -107,7 +107,7 @@ jobs: - name: Update pip run: python -m pip install -U pip - name: Install dependencies - run: pip install $(grep tomli== requirements-tests-py3.txt) $(grep mypy== requirements-tests-py3.txt) + run: pip install $(grep tomli== requirements-tests.txt) $(grep mypy== requirements-tests.txt) - name: Run stubtest run: python tests/stubtest_stdlib.py @@ -123,7 +123,7 @@ jobs: with: python-version: 3.9 - name: Install dependencies - run: pip install $(grep tomli== requirements-tests-py3.txt) + run: pip install $(grep tomli== requirements-tests.txt) - name: Run stubtest run: | STUBS=$(git diff --name-only origin/${{ github.base_ref }} HEAD | egrep ^stubs/ | cut -d "/" -f 2 | sort -u | (while read stub; do [ -d stubs/$stub ] && echo $stub || true; done)) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8d86e35d..6f957cada 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/psf/black - rev: 21.12b0 # must match requirements-tests-py3.txt + rev: 21.12b0 # must match requirements-tests.txt hooks: - id: black language_version: python3.9 - repo: https://github.com/pycqa/isort - rev: 5.10.1 # must match requirements-tests-py3.txt + rev: 5.10.1 # must match requirements-tests.txt hooks: - id: isort name: isort (python) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 374356e35..e6fe83a44 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,7 +55,7 @@ terminal window: $ python3 -m venv .venv3 $ source .venv3/bin/activate (.venv3)$ pip install -U pip -(.venv3)$ pip install -r requirements-tests-py3.txt +(.venv3)$ pip install -r requirements-tests.txt ``` ### Windows @@ -80,7 +80,7 @@ following commands from a Windows terminal: > python3 -m venv .venv3 > ".venv3/Scripts/activate" (.venv3) > python -m pip install -U pip -(.venv3) > python -m pip install -r requirements-tests-py3.txt +(.venv3) > python -m pip install -r requirements-tests.txt ``` ## Code formatting diff --git a/requirements-tests-py3.txt b/requirements-tests.txt similarity index 100% rename from requirements-tests-py3.txt rename to requirements-tests.txt diff --git a/scripts/generate_proto_stubs.sh b/scripts/generate_proto_stubs.sh index 05f63c0d2..7d7a606da 100755 --- a/scripts/generate_proto_stubs.sh +++ b/scripts/generate_proto_stubs.sh @@ -44,7 +44,7 @@ PYTHON_PROTOBUF_DIR=protobuf-$PROTOBUF_VERSION VENV=venv python3 -m venv $VENV source $VENV/bin/activate -pip install -r $REPO_ROOT/requirements-tests-py3.txt # for black and isort +pip install -r $REPO_ROOT/requirements-tests.txt # for black and isort # Install mypy-protobuf pip install git+https://github.com/dropbox/mypy-protobuf@${MYPY_PROTOBUF_VERSION} diff --git a/tests/stubtest_third_party.py b/tests/stubtest_third_party.py index 85901f03c..90294a437 100755 --- a/tests/stubtest_third_party.py +++ b/tests/stubtest_third_party.py @@ -27,7 +27,7 @@ class StubtestFailed(Exception): @functools.lru_cache() def get_mypy_req(): - with open("requirements-tests-py3.txt") as f: + with open("requirements-tests.txt") as f: return next(line.strip() for line in f if "mypy" in line)