diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 19f8d571f023..6b83c400645b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,20 +146,20 @@ jobs: python-platform: ${{ matrix.python-platform }} python-version: ${{ matrix.python-version }} no-comments: ${{ matrix.python-version != '3.10' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy. - project: ./pyrightconfig.stricter.json - uses: jakebailey/pyright-action@v1 with: version: ${{ steps.pyright_version.outputs.value }} python-platform: ${{ matrix.python-platform }} python-version: ${{ matrix.python-version }} no-comments: ${{ matrix.python-version != '3.10' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy. - project: ./pyrightconfig.testcases.json + project: ./pyrightconfig.stricter.json - uses: jakebailey/pyright-action@v1 with: version: ${{ steps.pyright_version.outputs.value }} python-platform: ${{ matrix.python-platform }} python-version: ${{ matrix.python-version }} no-comments: ${{ matrix.python-version != '3.10' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy. + project: ./pyrightconfig.testcases.json stub-uploader: name: Run the stub_uploader tests diff --git a/pyrightconfig.json b/pyrightconfig.json index 49419acd78e5..9fc8f5f5faa4 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -5,6 +5,10 @@ "stdlib", "stubs", ], + "exclude": [ + // test cases use a custom config file + "stubs/**/@tests/test_cases" + ], "typeCheckingMode": "basic", "strictListInference": true, "strictDictionaryInference": true, diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index e1f103e1c3b0..63c231e9dfe2 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -6,6 +6,8 @@ "stubs", ], "exclude": [ + // test cases use a custom pyrightconfig file + "stubs/**/@tests/test_cases", "stdlib/distutils/command", "stdlib/lib2to3/refactor.pyi", "stdlib/_tkinter.pyi", diff --git a/pyrightconfig.testcases.json b/pyrightconfig.testcases.json index 25c51569dd3b..13a7d8b37579 100644 --- a/pyrightconfig.testcases.json +++ b/pyrightconfig.testcases.json @@ -3,6 +3,7 @@ "typeshedPath": ".", "include": [ "test_cases", + "stubs/**/@tests/test_cases" ], "typeCheckingMode": "strict", // Using unspecific "type ignore" comments in test_cases. diff --git a/stubs/invoke/@tests/test_cases/check_task.py b/stubs/invoke/@tests/test_cases/check_task.py index 06b96ad7966f..a37dc58071cb 100644 --- a/stubs/invoke/@tests/test_cases/check_task.py +++ b/stubs/invoke/@tests/test_cases/check_task.py @@ -1,4 +1,3 @@ -# pyright: reportUnnecessaryTypeIgnoreComment=true from __future__ import annotations from invoke import Context, task @@ -9,7 +8,7 @@ @task -def docker_build(context: Context) -> None: +def docker_build(context: Context) -> None: # type: ignore pass