mirror of
https://github.com/microsoft/pyright.git
synced 2024-10-05 12:27:30 +03:00
Added logic in command-line parser to print usage if no files or projects are specified.
Added "bin" section to project.json. Bumped version to 1.0.3.
This commit is contained in:
parent
c9b18356a4
commit
e7e9e0a8eb
2
client/package-lock.json
generated
2
client/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pyright",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "pyright",
|
||||
"displayName": "Pyright",
|
||||
"description": "VS Code language support and type checking for Python",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pyright",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "pyright",
|
||||
"displayName": "Pyright",
|
||||
"description": "Type checker for the Python language",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
@ -26,5 +26,8 @@
|
||||
"@types/node": "^11.10.5",
|
||||
"typescript": "^3.2.2"
|
||||
},
|
||||
"main": "index.js"
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"pyright": "index.js"
|
||||
}
|
||||
}
|
||||
|
2
server/package-lock.json
generated
2
server/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pyright",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "pyright",
|
||||
"displayName": "pyright",
|
||||
"description": "Type checker for the Python language",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "npm run start:analyzer && npm run start:server",
|
||||
|
@ -80,6 +80,11 @@ function processArgs() {
|
||||
let watch = !!args.watch;
|
||||
options.watch = watch;
|
||||
|
||||
if ((options.fileSpecs === undefined || options.fileSpecs.length === 0) && !args.project) {
|
||||
printUsage();
|
||||
return;
|
||||
}
|
||||
|
||||
let service = new AnalyzerService();
|
||||
|
||||
service.setCompletionCallback(results => {
|
||||
@ -110,7 +115,7 @@ function processArgs() {
|
||||
|
||||
function printUsage() {
|
||||
console.log(
|
||||
'Usage: ' + toolName + ' [options] file...\n' +
|
||||
'Usage: ' + toolName + ' [options] files...\n' +
|
||||
' Options:\n' +
|
||||
' -h,--help Show this help message\n' +
|
||||
' -P,--python-path DIRECTORY Directory that contains the python environment\n' +
|
||||
|
Loading…
Reference in New Issue
Block a user