mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-17 03:40:44 +03:00
Improved command-line documentation to clarify that individual files specified on the command line will cause the config file to be ignored.
This commit is contained in:
parent
f8751dba57
commit
b59542c6ed
@ -1,5 +1,7 @@
|
||||
# Pyright Command-Line Options
|
||||
|
||||
Usage: pyright [options] [files...] (1)
|
||||
|
||||
Pyright can be run as either a VS Code extension or as a node-based command-line tool. The command-line version allows for the following options:
|
||||
|
||||
| Flag | Description |
|
||||
@ -9,20 +11,23 @@ Pyright can be run as either a VS Code extension or as a node-based command-line
|
||||
| -h, --help | Show help message |
|
||||
| --lib | Use library code for types when stubs are missing |
|
||||
| --outputjson | Output results in JSON format |
|
||||
| -p, --project FILE OR DIRECTORY | Use the configuration file at this location |
|
||||
| -p, --project FILE OR DIRECTORY | Use the configuration file at this location (2) |
|
||||
| --stats | Print detailed performance stats |
|
||||
| -t, --typeshed-path DIRECTORY | Use typeshed type stubs at this location (1) |
|
||||
| -v, --venv-path DIRECTORY | Directory that contains virtual environments (2) |
|
||||
| -t, --typeshed-path DIRECTORY | Use typeshed type stubs at this location (3) |
|
||||
| -v, --venv-path DIRECTORY | Directory that contains virtual environments (4) |
|
||||
| --verbose | Emit verbose diagnostics |
|
||||
| --version | Print pyright version |
|
||||
| -w, --watch | Continue to run and watch for changes (3) |
|
||||
| -w, --watch | Continue to run and watch for changes (5) |
|
||||
|
||||
(1) If specific files are specified on the command line, the pyrightconfig.json file is ignored.
|
||||
|
||||
(1) Pyright has built-in typeshed type stubs for Python stdlib functionality. To use a different version of typeshed type stubs, specify the directory with this option.
|
||||
(2) The ”--project” switch cannot be used if individual files are specified.
|
||||
|
||||
(2) This option is used in conjunction with configuration file, which can refer to different virtual environments by name. For more details, refer to the [configuration](/docs/configuration.md) documentation. This allows a common config file to be checked in to the project and shared by everyone on the development team without making assumptions about the local paths to the venv directory on each developer’s computer.
|
||||
(3) Pyright has built-in typeshed type stubs for Python stdlib functionality. To use a different version of typeshed type stubs, specify the directory with this option.
|
||||
|
||||
(3) When running in watch mode, pyright will reanalyze only those files that have been modified. These “deltas” are typically much faster than the initial analysis, which needs to analyze all files in the source tree.
|
||||
(4) This option is used in conjunction with configuration file, which can refer to different virtual environments by name. For more details, refer to the [configuration](/docs/configuration.md) documentation. This allows a common config file to be checked in to the project and shared by everyone on the development team without making assumptions about the local paths to the venv directory on each developer’s computer.
|
||||
|
||||
(5) When running in watch mode, pyright will reanalyze only those files that have been modified. These “deltas” are typically much faster than the initial analysis, which needs to analyze all files in the source tree.
|
||||
|
||||
|
||||
# Pyright Exit Codes
|
||||
|
Loading…
Reference in New Issue
Block a user