coc-pyright 1.1.185 → 1.1.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +13 -11
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -21206,7 +21206,6 @@ var SystemVariables = class extends AbstractSystemVariables {
|
|
|
21206
21206
|
// src/configSettings.ts
|
|
21207
21207
|
var _PythonSettings = class {
|
|
21208
21208
|
constructor() {
|
|
21209
|
-
this.isWindows = process.platform === "win32";
|
|
21210
21209
|
this.disposables = [];
|
|
21211
21210
|
this._pythonPath = "";
|
|
21212
21211
|
this.workspaceRoot = import_coc2.workspace.root ? import_coc2.workspace.root : __dirname;
|
|
@@ -21231,6 +21230,9 @@ var _PythonSettings = class {
|
|
|
21231
21230
|
this.disposables = [];
|
|
21232
21231
|
}
|
|
21233
21232
|
resolvePythonFromVENV() {
|
|
21233
|
+
function pythonBinFromPath(p) {
|
|
21234
|
+
return process.platform === "win32" ? import_path.default.join(p, "Scripts", "python.exe") : import_path.default.join(p, "bin", "python");
|
|
21235
|
+
}
|
|
21234
21236
|
try {
|
|
21235
21237
|
let p = import_path.default.join(this.workspaceRoot, ".python-version");
|
|
21236
21238
|
if (import_fs_extra.default.existsSync(p)) {
|
|
@@ -21255,20 +21257,20 @@ var _PythonSettings = class {
|
|
|
21255
21257
|
info = item;
|
|
21256
21258
|
}
|
|
21257
21259
|
if (info) {
|
|
21258
|
-
|
|
21259
|
-
return import_path.default.join(info, "Scripts", "python.exe");
|
|
21260
|
-
}
|
|
21261
|
-
return import_path.default.join(info, "bin", "python");
|
|
21260
|
+
return pythonBinFromPath(info);
|
|
21262
21261
|
}
|
|
21263
21262
|
}
|
|
21263
|
+
if (process.env.VIRTUAL_ENV && import_fs_extra.default.existsSync(import_path.default.join(process.env.VIRTUAL_ENV, "pyvenv.cfg"))) {
|
|
21264
|
+
return pythonBinFromPath(process.env.VIRTUAL_ENV);
|
|
21265
|
+
}
|
|
21266
|
+
if (process.env.CONDA_PREFIX) {
|
|
21267
|
+
return pythonBinFromPath(process.env.CONDA_PREFIX);
|
|
21268
|
+
}
|
|
21264
21269
|
const files = import_fs_extra.default.readdirSync(this.workspaceRoot);
|
|
21265
21270
|
for (const file of files) {
|
|
21266
|
-
const
|
|
21267
|
-
if (import_fs_extra.default.existsSync(import_path.default.join(
|
|
21268
|
-
|
|
21269
|
-
return import_path.default.join(p2, "Scripts", "python.exe");
|
|
21270
|
-
}
|
|
21271
|
-
return import_path.default.join(p2, "bin", "python");
|
|
21271
|
+
const x = import_path.default.join(this.workspaceRoot, file);
|
|
21272
|
+
if (import_fs_extra.default.existsSync(import_path.default.join(x, "pyvenv.cfg"))) {
|
|
21273
|
+
return pythonBinFromPath(x);
|
|
21272
21274
|
}
|
|
21273
21275
|
}
|
|
21274
21276
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coc-pyright",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.189",
|
|
4
4
|
"description": "Pyright extension for coc.nvim, static type checker for Python",
|
|
5
5
|
"author": "Heyward Fann <fannheyward@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@types/node": "10.12.0",
|
|
43
43
|
"@types/semver": "^7.3.9",
|
|
44
44
|
"@types/which": "^2.0.0",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
46
|
-
"@typescript-eslint/parser": "^5.
|
|
47
|
-
"coc.nvim": "^0.0.81-next.
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
46
|
+
"@typescript-eslint/parser": "^5.4.0",
|
|
47
|
+
"coc.nvim": "^0.0.81-next.7",
|
|
48
48
|
"diff-match-patch": "^1.0.5",
|
|
49
|
-
"esbuild": "^0.13.
|
|
50
|
-
"eslint": "^8.
|
|
49
|
+
"esbuild": "^0.13.15",
|
|
50
|
+
"eslint": "^8.3.0",
|
|
51
51
|
"fs-extra": "^10.0.0",
|
|
52
52
|
"iconv-lite": "^0.6.2",
|
|
53
53
|
"md5": "^2.3.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"rxjs-compat": "^6.6.7",
|
|
58
58
|
"semver": "^7.3.2",
|
|
59
59
|
"tree-kill": "^1.2.2",
|
|
60
|
-
"typescript": "^4.
|
|
60
|
+
"typescript": "^4.5.2",
|
|
61
61
|
"untildify": "^4.0.0",
|
|
62
62
|
"which": "^2.0.2"
|
|
63
63
|
},
|
|
@@ -1342,6 +1342,6 @@
|
|
|
1342
1342
|
]
|
|
1343
1343
|
},
|
|
1344
1344
|
"dependencies": {
|
|
1345
|
-
"pyright": "^1.1.
|
|
1345
|
+
"pyright": "^1.1.189"
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|