diff --git a/.github/workflows/stubsabot.yml b/.github/workflows/stubsabot.yml index 70089e0dd..53853af50 100644 --- a/.github/workflows/stubsabot.yml +++ b/.github/workflows/stubsabot.yml @@ -25,7 +25,7 @@ jobs: git config --global user.name stubsabot git config --global user.email '<>' - name: Install dependencies - run: pip install aiohttp packaging termcolor tomli tomlkit + run: pip install -r requiremements-tests.txt - name: Run stubsabot run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python scripts/stubsabot.py --action-level everything diff --git a/requirements-tests.txt b/requirements-tests.txt index a29d4c5d9..148dd708d 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,3 +1,4 @@ +aiohttp==3.8.1 mypy==0.971 pytype==2022.8.17; platform_system != "Windows" # must match .pre-commit-config.yaml @@ -9,6 +10,7 @@ flake8-pyi==22.8.1 # must match .pre-commit-config.yaml isort==5.10.1 tomli==1.2.2 +tomlkit==0.11.4 # must match .pre-commit-config.yaml pycln==2.1.1 packaging==21.3 diff --git a/tests/typecheck_typeshed.py b/tests/typecheck_typeshed.py index 8e3f0c8c8..f602f8974 100644 --- a/tests/typecheck_typeshed.py +++ b/tests/typecheck_typeshed.py @@ -60,11 +60,8 @@ def run_mypy_as_subprocess(directory: str, platform: str, version: str) -> Retur "ignore-without-code", "--namespace-packages", ] - if directory == "tests": - if platform == "win32": - command.extend(["--exclude", "tests/pytype_test.py"]) - else: - command.append("--ignore-missing-imports") + if directory == "tests" and platform == "win32": + command.extend(["--exclude", "tests/pytype_test.py"]) result = subprocess.run(command, capture_output=True) stdout, stderr = result.stdout, result.stderr if stderr: