Add a stricter config pass for pyright (#5612)

This commit is contained in:
Jake Bailey
2021-06-10 11:10:12 -07:00
committed by GitHub
parent cb76f32826
commit c4dc935b3f
5 changed files with 112 additions and 5 deletions

View File

@@ -47,10 +47,15 @@ This test requires [Node.js](https://nodejs.org) to be installed. It is
currently not part of the CI,
but it uses the same pyright version and configuration as the CI.
```
(.venv3)$ python3 tests/pyright_test.py # Check all files
(.venv3)$ python3 tests/pyright_test.py stdlib/sys.pyi # Check one file
(.venv3)$ python3 tests/pyright_test.py # Check all files
(.venv3)$ python3 tests/pyright_test.py stdlib/sys.pyi # Check one file
(.venv3)$ python3 tests/pyright_test.py -p pyrightconfig.stricter.json # Check with the stricter config.
```
`pyrightconfig.stricter.json` is a stricter configuration that enables additional
checks that would typically fail on incomplete stubs (such as `Unknown` checks),
and is run on a subset of stubs (including the standard library).
## check\_consistent.py
Run using:

View File

@@ -5,7 +5,7 @@ import subprocess
import sys
from pathlib import Path
_PYRIGHT_VERSION = "1.1.144" # Must match tests.yml.
_PYRIGHT_VERSION = "1.1.148" # Must match tests.yml.
_WELL_KNOWN_FILE = Path("tests", "pyright_test.py")