coc-pyright 1.1.191 → 1.1.194
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 +27 -33
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -1212,7 +1212,7 @@ var require_lru_cache = __commonJS({
|
|
|
1212
1212
|
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
|
|
1213
1213
|
this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
|
|
1214
1214
|
}
|
|
1215
|
-
this[CACHE] = new Map();
|
|
1215
|
+
this[CACHE] = /* @__PURE__ */ new Map();
|
|
1216
1216
|
this[LRU_LIST] = new Yallist();
|
|
1217
1217
|
this[LENGTH] = 0;
|
|
1218
1218
|
}
|
|
@@ -1443,7 +1443,7 @@ var require_range = __commonJS({
|
|
|
1443
1443
|
const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
1444
1444
|
const rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)).filter(this.options.loose ? (comp) => !!comp.match(compRe) : () => true).map((comp) => new Comparator(comp, this.options));
|
|
1445
1445
|
const l = rangeList.length;
|
|
1446
|
-
const rangeMap = new Map();
|
|
1446
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
1447
1447
|
for (const comp of rangeList) {
|
|
1448
1448
|
if (isNullSet(comp))
|
|
1449
1449
|
return [comp];
|
|
@@ -2162,7 +2162,7 @@ var require_subset = __commonJS({
|
|
|
2162
2162
|
else
|
|
2163
2163
|
dom = [new Comparator(">=0.0.0")];
|
|
2164
2164
|
}
|
|
2165
|
-
const eqSet = new Set();
|
|
2165
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
2166
2166
|
let gt, lt2;
|
|
2167
2167
|
for (const c of sub) {
|
|
2168
2168
|
if (c.operator === ">" || c.operator === ">=")
|
|
@@ -16559,7 +16559,7 @@ var require_distinct = __commonJS({
|
|
|
16559
16559
|
var noop_1 = require_noop();
|
|
16560
16560
|
function distinct(keySelector, flushes) {
|
|
16561
16561
|
return lift_1.operate(function(source, subscriber) {
|
|
16562
|
-
var distinctKeys = new Set();
|
|
16562
|
+
var distinctKeys = /* @__PURE__ */ new Set();
|
|
16563
16563
|
source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) {
|
|
16564
16564
|
var key = keySelector ? keySelector(value) : value;
|
|
16565
16565
|
if (!distinctKeys.has(key)) {
|
|
@@ -16994,7 +16994,7 @@ var require_groupBy = __commonJS({
|
|
|
16994
16994
|
} else {
|
|
16995
16995
|
duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector;
|
|
16996
16996
|
}
|
|
16997
|
-
var groups = new Map();
|
|
16997
|
+
var groups = /* @__PURE__ */ new Map();
|
|
16998
16998
|
var notify = function(cb) {
|
|
16999
16999
|
groups.forEach(cb);
|
|
17000
17000
|
cb(subscriber);
|
|
@@ -21351,7 +21351,7 @@ var _PythonSettings = class {
|
|
|
21351
21351
|
}
|
|
21352
21352
|
};
|
|
21353
21353
|
var PythonSettings = _PythonSettings;
|
|
21354
|
-
PythonSettings.pythonSettings = new Map();
|
|
21354
|
+
PythonSettings.pythonSettings = /* @__PURE__ */ new Map();
|
|
21355
21355
|
function getPythonExecutable(pythonPath) {
|
|
21356
21356
|
pythonPath = (0, import_untildify.default)(pythonPath);
|
|
21357
21357
|
if (pythonPath === "python" || pythonPath.indexOf(import_path.default.sep) === -1 || import_path.default.basename(pythonPath) === import_path.default.dirname(pythonPath)) {
|
|
@@ -21389,12 +21389,6 @@ var import_coc3 = __toModule(require("coc.nvim"));
|
|
|
21389
21389
|
var import_diff_match_patch = __toModule(require_diff_match_patch());
|
|
21390
21390
|
var import_os = __toModule(require("os"));
|
|
21391
21391
|
var NEW_LINE_LENGTH = import_os.EOL.length;
|
|
21392
|
-
var EditAction;
|
|
21393
|
-
(function(EditAction2) {
|
|
21394
|
-
EditAction2[EditAction2["Delete"] = 0] = "Delete";
|
|
21395
|
-
EditAction2[EditAction2["Insert"] = 1] = "Insert";
|
|
21396
|
-
EditAction2[EditAction2["Replace"] = 2] = "Replace";
|
|
21397
|
-
})(EditAction || (EditAction = {}));
|
|
21398
21392
|
var Edit = class {
|
|
21399
21393
|
constructor(action, start) {
|
|
21400
21394
|
this.action = action;
|
|
@@ -21403,11 +21397,11 @@ var Edit = class {
|
|
|
21403
21397
|
}
|
|
21404
21398
|
apply() {
|
|
21405
21399
|
switch (this.action) {
|
|
21406
|
-
case 1
|
|
21400
|
+
case 1 /* Insert */:
|
|
21407
21401
|
return import_coc3.TextEdit.insert(this.start, this.text);
|
|
21408
|
-
case 0
|
|
21402
|
+
case 0 /* Delete */:
|
|
21409
21403
|
return import_coc3.TextEdit.del(import_coc3.Range.create(this.start, this.end));
|
|
21410
|
-
case 2
|
|
21404
|
+
case 2 /* Replace */:
|
|
21411
21405
|
return import_coc3.TextEdit.replace(import_coc3.Range.create(this.start, this.end), this.text);
|
|
21412
21406
|
default:
|
|
21413
21407
|
return {
|
|
@@ -21440,17 +21434,17 @@ function getTextEditsInternal(before, diffs, startLine = 0) {
|
|
|
21440
21434
|
switch (diffs[i][0]) {
|
|
21441
21435
|
case dmp.DIFF_DELETE:
|
|
21442
21436
|
if (edit === null) {
|
|
21443
|
-
edit = new Edit(0
|
|
21444
|
-
} else if (edit.action !== 0) {
|
|
21437
|
+
edit = new Edit(0 /* Delete */, start);
|
|
21438
|
+
} else if (edit.action !== 0 /* Delete */) {
|
|
21445
21439
|
throw new Error("cannot format due to an internal error.");
|
|
21446
21440
|
}
|
|
21447
21441
|
edit.end = { line, character };
|
|
21448
21442
|
break;
|
|
21449
21443
|
case dmp.DIFF_INSERT:
|
|
21450
21444
|
if (edit === null) {
|
|
21451
|
-
edit = new Edit(1
|
|
21452
|
-
} else if (edit.action === 0) {
|
|
21453
|
-
edit.action = 2
|
|
21445
|
+
edit = new Edit(1 /* Insert */, start);
|
|
21446
|
+
} else if (edit.action === 0 /* Delete */) {
|
|
21447
|
+
edit.action = 2 /* Replace */;
|
|
21454
21448
|
}
|
|
21455
21449
|
line = start.line;
|
|
21456
21450
|
character = start.character;
|
|
@@ -22090,7 +22084,7 @@ var BlackdFormatter = class extends BaseFormatter {
|
|
|
22090
22084
|
// src/formatProvider.ts
|
|
22091
22085
|
var PythonFormattingEditProvider = class {
|
|
22092
22086
|
constructor() {
|
|
22093
|
-
this.formatters = new Map();
|
|
22087
|
+
this.formatters = /* @__PURE__ */ new Map();
|
|
22094
22088
|
this.disposables = [];
|
|
22095
22089
|
this.pythonSettings = PythonSettings.getInstance();
|
|
22096
22090
|
this.outputChannel = import_coc8.window.createOutputChannel("coc-pyright-formatting");
|
|
@@ -22207,8 +22201,7 @@ var import_minimatch = __toModule(require_minimatch());
|
|
|
22207
22201
|
var import_path4 = __toModule(require("path"));
|
|
22208
22202
|
|
|
22209
22203
|
// src/types.ts
|
|
22210
|
-
var Product
|
|
22211
|
-
(function(Product2) {
|
|
22204
|
+
var Product = /* @__PURE__ */ ((Product2) => {
|
|
22212
22205
|
Product2[Product2["pylint"] = 1] = "pylint";
|
|
22213
22206
|
Product2[Product2["flake8"] = 2] = "flake8";
|
|
22214
22207
|
Product2[Product2["pycodestyle"] = 3] = "pycodestyle";
|
|
@@ -22224,26 +22217,27 @@ var Product;
|
|
|
22224
22217
|
Product2[Product2["darker"] = 13] = "darker";
|
|
22225
22218
|
Product2[Product2["rope"] = 14] = "rope";
|
|
22226
22219
|
Product2[Product2["blackd"] = 15] = "blackd";
|
|
22227
|
-
|
|
22228
|
-
|
|
22229
|
-
(
|
|
22220
|
+
return Product2;
|
|
22221
|
+
})(Product || {});
|
|
22222
|
+
var LintMessageSeverity = /* @__PURE__ */ ((LintMessageSeverity2) => {
|
|
22230
22223
|
LintMessageSeverity2[LintMessageSeverity2["Hint"] = 0] = "Hint";
|
|
22231
22224
|
LintMessageSeverity2[LintMessageSeverity2["Error"] = 1] = "Error";
|
|
22232
22225
|
LintMessageSeverity2[LintMessageSeverity2["Warning"] = 2] = "Warning";
|
|
22233
22226
|
LintMessageSeverity2[LintMessageSeverity2["Information"] = 3] = "Information";
|
|
22234
|
-
|
|
22227
|
+
return LintMessageSeverity2;
|
|
22228
|
+
})(LintMessageSeverity || {});
|
|
22235
22229
|
var LinterErrors;
|
|
22236
|
-
(
|
|
22230
|
+
((LinterErrors2) => {
|
|
22237
22231
|
let pylint;
|
|
22238
|
-
(
|
|
22232
|
+
((pylint2) => {
|
|
22239
22233
|
pylint2.InvalidSyntax = "E0001";
|
|
22240
22234
|
})(pylint = LinterErrors2.pylint || (LinterErrors2.pylint = {}));
|
|
22241
22235
|
let prospector;
|
|
22242
|
-
(
|
|
22236
|
+
((prospector2) => {
|
|
22243
22237
|
prospector2.InvalidSyntax = "F999";
|
|
22244
22238
|
})(prospector = LinterErrors2.prospector || (LinterErrors2.prospector = {}));
|
|
22245
22239
|
let flake8;
|
|
22246
|
-
(
|
|
22240
|
+
((flake82) => {
|
|
22247
22241
|
flake82.InvalidSyntax = "E999";
|
|
22248
22242
|
})(flake8 = LinterErrors2.flake8 || (LinterErrors2.flake8 = {}));
|
|
22249
22243
|
})(LinterErrors || (LinterErrors = {}));
|
|
@@ -22736,7 +22730,7 @@ var Pytype = class extends BaseLinter {
|
|
|
22736
22730
|
// src/linters/lintingEngine.ts
|
|
22737
22731
|
"use strict";
|
|
22738
22732
|
var PYTHON = { language: "python" };
|
|
22739
|
-
var lintSeverityToVSSeverity = new Map();
|
|
22733
|
+
var lintSeverityToVSSeverity = /* @__PURE__ */ new Map();
|
|
22740
22734
|
lintSeverityToVSSeverity.set(LintMessageSeverity.Error, import_coc20.DiagnosticSeverity.Error);
|
|
22741
22735
|
lintSeverityToVSSeverity.set(LintMessageSeverity.Hint, import_coc20.DiagnosticSeverity.Hint);
|
|
22742
22736
|
lintSeverityToVSSeverity.set(LintMessageSeverity.Information, import_coc20.DiagnosticSeverity.Information);
|
|
@@ -22754,7 +22748,7 @@ var DisabledLinter = class {
|
|
|
22754
22748
|
};
|
|
22755
22749
|
var LintingEngine = class {
|
|
22756
22750
|
constructor() {
|
|
22757
|
-
this.pendingLintings = new Map();
|
|
22751
|
+
this.pendingLintings = /* @__PURE__ */ new Map();
|
|
22758
22752
|
this.outputChannel = import_coc20.window.createOutputChannel("coc-pyright-linting");
|
|
22759
22753
|
this.diagnosticCollection = import_coc20.languages.createDiagnosticCollection("python");
|
|
22760
22754
|
this.configService = PythonSettings.getInstance();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coc-pyright",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.194",
|
|
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": "12.12",
|
|
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.
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
46
|
+
"@typescript-eslint/parser": "^5.6.0",
|
|
47
47
|
"coc.nvim": "^0.0.81-next.7",
|
|
48
48
|
"diff-match-patch": "^1.0.5",
|
|
49
|
-
"esbuild": "^0.
|
|
50
|
-
"eslint": "^8.
|
|
49
|
+
"esbuild": "^0.14.2",
|
|
50
|
+
"eslint": "^8.4.1",
|
|
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.5.
|
|
60
|
+
"typescript": "^4.5.3",
|
|
61
61
|
"untildify": "^4.0.0",
|
|
62
62
|
"which": "^2.0.2"
|
|
63
63
|
},
|
|
@@ -1347,6 +1347,6 @@
|
|
|
1347
1347
|
]
|
|
1348
1348
|
},
|
|
1349
1349
|
"dependencies": {
|
|
1350
|
-
"pyright": "^1.1.
|
|
1350
|
+
"pyright": "^1.1.194"
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|