mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-17 03:40:44 +03:00
Exposed the useLibraryForTypes setting on the command line through a "--lib" switch.
This commit is contained in:
parent
581869a059
commit
cd93a97931
@ -7,6 +7,7 @@ Pyright can be run as either a VS Code extension or as a node-based command-line
|
||||
| --createstub IMPORT | Create type stub file(s) for import |
|
||||
| --dependencies | Emit import dependency information |
|
||||
| -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 |
|
||||
| --stats | Print detailed performance stats |
|
||||
|
@ -65,6 +65,7 @@ function processArgs() {
|
||||
{ name: 'dependencies', type: Boolean },
|
||||
{ name: 'files', type: String, multiple: true, defaultOption: true },
|
||||
{ name: 'help', alias: 'h', type: Boolean },
|
||||
{ name: 'lib', type: Boolean },
|
||||
{ name: 'outputjson', type: Boolean },
|
||||
{ name: 'project', alias: 'p', type: String },
|
||||
{ name: 'stats' },
|
||||
@ -143,7 +144,7 @@ function processArgs() {
|
||||
|
||||
options.verboseOutput = !!args.verbose;
|
||||
options.checkOnlyOpenFiles = false;
|
||||
options.useLibraryCodeForTypes = false;
|
||||
options.useLibraryCodeForTypes = !!args.lib;
|
||||
|
||||
const watch = args.watch !== undefined;
|
||||
options.watch = watch;
|
||||
@ -230,6 +231,7 @@ function printUsage() {
|
||||
' --createstub IMPORT Create type stub file(s) for import\n' +
|
||||
' --dependencies Emit import dependency information\n' +
|
||||
' -h,--help Show this help message\n' +
|
||||
' --lib Use library code to infer types when stubs are missing' +
|
||||
' --outputjson Output results in JSON format\n' +
|
||||
' -p,--project FILE OR DIRECTORY Use the configuration file at this location\n' +
|
||||
' --stats Print detailed performance stats\n' +
|
||||
|
Loading…
Reference in New Issue
Block a user