From ddf8c72a10a322665bd51addf508e7568aeab8da Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Fri, 6 Aug 2021 00:04:42 -0700 Subject: [PATCH 1/2] Updated pyright version to 1.1.160. Older versions contained a bug that prevented multiple third-party stub packages from having the same top-level module name. --- .github/workflows/tests.yml | 2 +- tests/pyright_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7121955d73e1..3b1c59b3a021 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -77,7 +77,7 @@ jobs: python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] fail-fast: false env: - PYRIGHT_VERSION: 1.1.152 # Must match pyright_test.py. + PYRIGHT_VERSION: 1.1.160 # Must match pyright_test.py. steps: - uses: actions/checkout@v2 - uses: jakebailey/pyright-action@v1 diff --git a/tests/pyright_test.py b/tests/pyright_test.py index cb755aa6f781..789c1e849bc1 100755 --- a/tests/pyright_test.py +++ b/tests/pyright_test.py @@ -5,7 +5,7 @@ import sys from pathlib import Path -_PYRIGHT_VERSION = "1.1.152" # Must match tests.yml. +_PYRIGHT_VERSION = "1.1.160" # Must match tests.yml. _WELL_KNOWN_FILE = Path("tests", "pyright_test.py") From 6f721ce83b40ca4ac20c3ebc87735348579742a0 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Fri, 6 Aug 2021 00:13:10 -0700 Subject: [PATCH 2/2] Disabled "reportUnsupportedDunderAll" diagnostic check for now. --- pyrightconfig.json | 8 +++++--- pyrightconfig.stricter.json | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pyrightconfig.json b/pyrightconfig.json index 539327753a46..6aa021cacf1f 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -51,7 +51,6 @@ "reportUndefinedVariable": "error", "reportUnboundVariable": "error", "reportInvalidStubStatement": "error", - "reportUnsupportedDunderAll": "error", "reportInvalidTypeVarUse": "error", "reportPropertyTypeMismatch": "error", "reportSelfClsParameterName": "error", @@ -59,5 +58,8 @@ // of the "factions.Fraction.__pow__" method and "tasks.gather" function. // Mypy's overlapping overload logic misses these issues (see mypy // issue #10143 and #10157). - "reportOverlappingOverload": "none" -} + "reportOverlappingOverload": "none", + // Several stubs refer to symbols in __all__ that are conditionally + // declared based on platform or version checks. + "reportUnsupportedDunderAll": "none", +} \ No newline at end of file diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index 129beea451a1..99fc60d720d3 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -103,7 +103,6 @@ "reportUndefinedVariable": "error", "reportUnboundVariable": "error", "reportInvalidStubStatement": "error", - "reportUnsupportedDunderAll": "error", "reportInvalidTypeVarUse": "error", "reportPropertyTypeMismatch": "error", "reportSelfClsParameterName": "error", @@ -111,5 +110,8 @@ // of the "factions.Fraction.__pow__" method and "tasks.gather" function. // Mypy's overlapping overload logic misses these issues (see mypy // issue #10143 and #10157). - "reportOverlappingOverload": "none" -} + "reportOverlappingOverload": "none", + // Several stubs refer to symbols in __all__ that are conditionally + // declared based on platform or version checks. + "reportUnsupportedDunderAll": "none", +} \ No newline at end of file