mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 03:41:28 +08:00
Add a stricter config pass for pyright (#5612)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user