From 58c6f98422347c820ff0469b231c8084b702478a Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 24 Jan 2024 14:22:24 -0500 Subject: [PATCH 1/2] Initial config --- pyrightconfig.json | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pyrightconfig.json diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 0000000000..48bfbbf4ab --- /dev/null +++ b/pyrightconfig.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json", + "exclude": [ + "build", + ".tox", + "**/extern", // Vendored + "**/_vendor", // Vendored + "setuptools/_distutils", // Vendored + "**/tests", // Disabled as long as analyzeUnannotatedFunctions=false to reduce log spam + "**/_*", // Disabled as long as analyzeUnannotatedFunctions=false to reduce log spam + ], + // CI should test for all versions, local development gets hints for oldest supported + "pythonVersion": "3.8", + // For now we don't mind if mypy's `type: ignore` comments accidentally suppresses pyright issues + "enableTypeIgnoreComments": true, + "typeCheckingMode": "basic", + // For now, align with mypy's default of skipping unnanotated functions, only care about public API which should be annotated + "analyzeUnannotatedFunctions": false, + // TODO: Test environment is not yet properly configured to install all imported packages + "reportMissingImports": "none", + // Too many issues caused by vendoring and dynamic patching, still worth fixing when we can + "reportAttributeAccessIssue": "warning", + // Defered initialization (initialize_options/finalize_options) causes many "potentially None" issues + // TODO: Fix with type-guards or by changing how it's initialized + "reportCallIssue": "warning", + "reportArgumentType": "warning", + "reportOptionalIterable": "warning", + "reportOptionalMemberAccess": "warning", + "reportGeneralTypeIssues": "warning", + "reportOptionalOperand": "warning", +} From 2ce2037ab65c8ab3b9686b64359528c18b1ec67f Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 24 Jan 2024 19:38:30 -0500 Subject: [PATCH 2/2] placeholder workflow --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e841bde57c..cbfd594433 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,6 +34,24 @@ env: jobs: + pyright: + strategy: + matrix: + python: + - "3.8" + - "3.11" + - "3.12" + platform: + - ubuntu-latest + - macos-latest + - windows-latest + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + - uses: jakebailey/pyright-action@v2 + with: + python-version: ${{ matrix.python }} + test: strategy: matrix: