coc-pyright 1.1.255 → 1.1.265
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 +277 -163
- package/package.json +13 -2
- package/schemas/pyrightconfig.schema.json +6 -0
package/lib/index.js
CHANGED
|
@@ -1,26 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
25
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
26
10
|
};
|
|
@@ -36,7 +20,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
20
|
}
|
|
37
21
|
return to;
|
|
38
22
|
};
|
|
39
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
40
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
28
|
|
|
42
29
|
// node_modules/semver/internal/constants.js
|
|
@@ -181,7 +168,9 @@ var require_semver = __commonJS({
|
|
|
181
168
|
throw new TypeError(`Invalid Version: ${version}`);
|
|
182
169
|
}
|
|
183
170
|
if (version.length > MAX_LENGTH) {
|
|
184
|
-
throw new TypeError(
|
|
171
|
+
throw new TypeError(
|
|
172
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
173
|
+
);
|
|
185
174
|
}
|
|
186
175
|
debug("SemVer", version, options);
|
|
187
176
|
this.options = options;
|
|
@@ -450,7 +439,10 @@ var require_inc = __commonJS({
|
|
|
450
439
|
options = void 0;
|
|
451
440
|
}
|
|
452
441
|
try {
|
|
453
|
-
return new SemVer2(
|
|
442
|
+
return new SemVer2(
|
|
443
|
+
version instanceof SemVer2 ? version.version : version,
|
|
444
|
+
options
|
|
445
|
+
).inc(release, identifier).version;
|
|
454
446
|
} catch (er) {
|
|
455
447
|
return null;
|
|
456
448
|
}
|
|
@@ -2582,7 +2574,11 @@ var require_universalify = __commonJS({
|
|
|
2582
2574
|
fn.apply(this, args);
|
|
2583
2575
|
else {
|
|
2584
2576
|
return new Promise((resolve, reject) => {
|
|
2585
|
-
fn.call(
|
|
2577
|
+
fn.call(
|
|
2578
|
+
this,
|
|
2579
|
+
...args,
|
|
2580
|
+
(err, res) => err != null ? reject(err) : resolve(res)
|
|
2581
|
+
);
|
|
2586
2582
|
});
|
|
2587
2583
|
}
|
|
2588
2584
|
}, "name", { value: fn.name });
|
|
@@ -2723,19 +2719,24 @@ var require_polyfills = __commonJS({
|
|
|
2723
2719
|
}(fs6.readSync);
|
|
2724
2720
|
function patchLchmod(fs7) {
|
|
2725
2721
|
fs7.lchmod = function(path10, mode, callback) {
|
|
2726
|
-
fs7.open(
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
fs7.fchmod(fd, mode, function(err2) {
|
|
2733
|
-
fs7.close(fd, function(err22) {
|
|
2722
|
+
fs7.open(
|
|
2723
|
+
path10,
|
|
2724
|
+
constants.O_WRONLY | constants.O_SYMLINK,
|
|
2725
|
+
mode,
|
|
2726
|
+
function(err, fd) {
|
|
2727
|
+
if (err) {
|
|
2734
2728
|
if (callback)
|
|
2735
|
-
callback(
|
|
2729
|
+
callback(err);
|
|
2730
|
+
return;
|
|
2731
|
+
}
|
|
2732
|
+
fs7.fchmod(fd, mode, function(err2) {
|
|
2733
|
+
fs7.close(fd, function(err22) {
|
|
2734
|
+
if (callback)
|
|
2735
|
+
callback(err2 || err22);
|
|
2736
|
+
});
|
|
2736
2737
|
});
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2738
|
+
}
|
|
2739
|
+
);
|
|
2739
2740
|
};
|
|
2740
2741
|
fs7.lchmodSync = function(path10, mode) {
|
|
2741
2742
|
var fd = fs7.openSync(path10, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
@@ -2930,12 +2931,12 @@ var require_legacy_streams = __commonJS({
|
|
|
2930
2931
|
if (this.encoding)
|
|
2931
2932
|
this.setEncoding(this.encoding);
|
|
2932
2933
|
if (this.start !== void 0) {
|
|
2933
|
-
if (typeof this.start
|
|
2934
|
+
if ("number" !== typeof this.start) {
|
|
2934
2935
|
throw TypeError("start must be a Number");
|
|
2935
2936
|
}
|
|
2936
2937
|
if (this.end === void 0) {
|
|
2937
2938
|
this.end = Infinity;
|
|
2938
|
-
} else if (typeof this.end
|
|
2939
|
+
} else if ("number" !== typeof this.end) {
|
|
2939
2940
|
throw TypeError("end must be a Number");
|
|
2940
2941
|
}
|
|
2941
2942
|
if (this.start > this.end) {
|
|
@@ -2978,7 +2979,7 @@ var require_legacy_streams = __commonJS({
|
|
|
2978
2979
|
this[key] = options[key];
|
|
2979
2980
|
}
|
|
2980
2981
|
if (this.start !== void 0) {
|
|
2981
|
-
if (typeof this.start
|
|
2982
|
+
if ("number" !== typeof this.start) {
|
|
2982
2983
|
throw TypeError("start must be a Number");
|
|
2983
2984
|
}
|
|
2984
2985
|
if (this.start < 0) {
|
|
@@ -3415,7 +3416,11 @@ var require_fs = __commonJS({
|
|
|
3415
3416
|
if (typeof fs6.realpath.native === "function") {
|
|
3416
3417
|
exports.realpath.native = u(fs6.realpath.native);
|
|
3417
3418
|
} else {
|
|
3418
|
-
process.emitWarning(
|
|
3419
|
+
process.emitWarning(
|
|
3420
|
+
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
3421
|
+
"Warning",
|
|
3422
|
+
"fs-extra-WARN0003"
|
|
3423
|
+
);
|
|
3419
3424
|
}
|
|
3420
3425
|
}
|
|
3421
3426
|
});
|
|
@@ -3448,7 +3453,7 @@ var require_make_dir = __commonJS({
|
|
|
3448
3453
|
const defaults = { mode: 511 };
|
|
3449
3454
|
if (typeof options === "number")
|
|
3450
3455
|
return options;
|
|
3451
|
-
return
|
|
3456
|
+
return { ...defaults, ...options }.mode;
|
|
3452
3457
|
};
|
|
3453
3458
|
module2.exports.makeDir = async (dir, options) => {
|
|
3454
3459
|
checkPath(dir);
|
|
@@ -3691,7 +3696,11 @@ var require_copy = __commonJS({
|
|
|
3691
3696
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
3692
3697
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
3693
3698
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
3694
|
-
process.emitWarning(
|
|
3699
|
+
process.emitWarning(
|
|
3700
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
3701
|
+
"Warning",
|
|
3702
|
+
"fs-extra-WARN0001"
|
|
3703
|
+
);
|
|
3695
3704
|
}
|
|
3696
3705
|
stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
|
|
3697
3706
|
if (err)
|
|
@@ -3910,7 +3919,11 @@ var require_copy_sync = __commonJS({
|
|
|
3910
3919
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
3911
3920
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
3912
3921
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
3913
|
-
process.emitWarning(
|
|
3922
|
+
process.emitWarning(
|
|
3923
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
3924
|
+
"Warning",
|
|
3925
|
+
"fs-extra-WARN0002"
|
|
3926
|
+
);
|
|
3914
3927
|
}
|
|
3915
3928
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
3916
3929
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
@@ -4727,7 +4740,10 @@ var require_universalify2 = __commonJS({
|
|
|
4727
4740
|
fn.apply(this, args);
|
|
4728
4741
|
else {
|
|
4729
4742
|
return new Promise((resolve, reject) => {
|
|
4730
|
-
fn.apply(
|
|
4743
|
+
fn.apply(
|
|
4744
|
+
this,
|
|
4745
|
+
args.concat([(err, res) => err ? reject(err) : resolve(res)])
|
|
4746
|
+
);
|
|
4731
4747
|
});
|
|
4732
4748
|
}
|
|
4733
4749
|
}, "name", { value: fn.name });
|
|
@@ -5090,7 +5106,18 @@ var require_move2 = __commonJS({
|
|
|
5090
5106
|
var require_lib = __commonJS({
|
|
5091
5107
|
"node_modules/fs-extra/lib/index.js"(exports, module2) {
|
|
5092
5108
|
"use strict";
|
|
5093
|
-
module2.exports =
|
|
5109
|
+
module2.exports = {
|
|
5110
|
+
...require_fs(),
|
|
5111
|
+
...require_copy2(),
|
|
5112
|
+
...require_empty(),
|
|
5113
|
+
...require_ensure(),
|
|
5114
|
+
...require_json(),
|
|
5115
|
+
...require_mkdirs(),
|
|
5116
|
+
...require_move2(),
|
|
5117
|
+
...require_output_file(),
|
|
5118
|
+
...require_path_exists(),
|
|
5119
|
+
...require_remove()
|
|
5120
|
+
};
|
|
5094
5121
|
}
|
|
5095
5122
|
});
|
|
5096
5123
|
|
|
@@ -5420,7 +5447,10 @@ var require_diff_match_patch = __commonJS({
|
|
|
5420
5447
|
diffs = [
|
|
5421
5448
|
new diff_match_patch2.Diff(DIFF_INSERT, longtext.substring(0, i)),
|
|
5422
5449
|
new diff_match_patch2.Diff(DIFF_EQUAL, shorttext),
|
|
5423
|
-
new diff_match_patch2.Diff(
|
|
5450
|
+
new diff_match_patch2.Diff(
|
|
5451
|
+
DIFF_INSERT,
|
|
5452
|
+
longtext.substring(i + shorttext.length)
|
|
5453
|
+
)
|
|
5424
5454
|
];
|
|
5425
5455
|
if (text1.length > text2.length) {
|
|
5426
5456
|
diffs[0][0] = diffs[2][0] = DIFF_DELETE;
|
|
@@ -5442,7 +5472,10 @@ var require_diff_match_patch = __commonJS({
|
|
|
5442
5472
|
var mid_common = hm[4];
|
|
5443
5473
|
var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);
|
|
5444
5474
|
var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);
|
|
5445
|
-
return diffs_a.concat(
|
|
5475
|
+
return diffs_a.concat(
|
|
5476
|
+
[new diff_match_patch2.Diff(DIFF_EQUAL, mid_common)],
|
|
5477
|
+
diffs_b
|
|
5478
|
+
);
|
|
5446
5479
|
}
|
|
5447
5480
|
if (checklines && text1.length > 100 && text2.length > 100) {
|
|
5448
5481
|
return this.diff_lineMode_(text1, text2, deadline);
|
|
@@ -5475,7 +5508,10 @@ var require_diff_match_patch = __commonJS({
|
|
|
5475
5508
|
break;
|
|
5476
5509
|
case DIFF_EQUAL:
|
|
5477
5510
|
if (count_delete >= 1 && count_insert >= 1) {
|
|
5478
|
-
diffs.splice(
|
|
5511
|
+
diffs.splice(
|
|
5512
|
+
pointer - count_delete - count_insert,
|
|
5513
|
+
count_delete + count_insert
|
|
5514
|
+
);
|
|
5479
5515
|
pointer = pointer - count_delete - count_insert;
|
|
5480
5516
|
var subDiff = this.diff_main(text_delete, text_insert, false, deadline);
|
|
5481
5517
|
for (var j = subDiff.length - 1; j >= 0; j--) {
|
|
@@ -5721,8 +5757,14 @@ var require_diff_match_patch = __commonJS({
|
|
|
5721
5757
|
var best_common = "";
|
|
5722
5758
|
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
|
|
5723
5759
|
while ((j = shorttext2.indexOf(seed, j + 1)) != -1) {
|
|
5724
|
-
var prefixLength = dmp.diff_commonPrefix(
|
|
5725
|
-
|
|
5760
|
+
var prefixLength = dmp.diff_commonPrefix(
|
|
5761
|
+
longtext2.substring(i),
|
|
5762
|
+
shorttext2.substring(j)
|
|
5763
|
+
);
|
|
5764
|
+
var suffixLength = dmp.diff_commonSuffix(
|
|
5765
|
+
longtext2.substring(0, i),
|
|
5766
|
+
shorttext2.substring(0, j)
|
|
5767
|
+
);
|
|
5726
5768
|
if (best_common.length < suffixLength + prefixLength) {
|
|
5727
5769
|
best_common = shorttext2.substring(j - suffixLength, j) + shorttext2.substring(j, j + prefixLength);
|
|
5728
5770
|
best_longtext_a = longtext2.substring(0, i - suffixLength);
|
|
@@ -5743,8 +5785,16 @@ var require_diff_match_patch = __commonJS({
|
|
|
5743
5785
|
return null;
|
|
5744
5786
|
}
|
|
5745
5787
|
}
|
|
5746
|
-
var hm1 = diff_halfMatchI_(
|
|
5747
|
-
|
|
5788
|
+
var hm1 = diff_halfMatchI_(
|
|
5789
|
+
longtext,
|
|
5790
|
+
shorttext,
|
|
5791
|
+
Math.ceil(longtext.length / 4)
|
|
5792
|
+
);
|
|
5793
|
+
var hm2 = diff_halfMatchI_(
|
|
5794
|
+
longtext,
|
|
5795
|
+
shorttext,
|
|
5796
|
+
Math.ceil(longtext.length / 2)
|
|
5797
|
+
);
|
|
5748
5798
|
var hm;
|
|
5749
5799
|
if (!hm1 && !hm2) {
|
|
5750
5800
|
return null;
|
|
@@ -5794,8 +5844,15 @@ var require_diff_match_patch = __commonJS({
|
|
|
5794
5844
|
} else {
|
|
5795
5845
|
length_deletions2 += diffs[pointer][1].length;
|
|
5796
5846
|
}
|
|
5797
|
-
if (lastEquality && lastEquality.length <= Math.max(length_insertions1, length_deletions1) && lastEquality.length <= Math.max(
|
|
5798
|
-
|
|
5847
|
+
if (lastEquality && lastEquality.length <= Math.max(length_insertions1, length_deletions1) && lastEquality.length <= Math.max(
|
|
5848
|
+
length_insertions2,
|
|
5849
|
+
length_deletions2
|
|
5850
|
+
)) {
|
|
5851
|
+
diffs.splice(
|
|
5852
|
+
equalities[equalitiesLength - 1],
|
|
5853
|
+
0,
|
|
5854
|
+
new diff_match_patch2.Diff(DIFF_DELETE, lastEquality)
|
|
5855
|
+
);
|
|
5799
5856
|
diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;
|
|
5800
5857
|
equalitiesLength--;
|
|
5801
5858
|
equalitiesLength--;
|
|
@@ -5823,14 +5880,20 @@ var require_diff_match_patch = __commonJS({
|
|
|
5823
5880
|
var overlap_length2 = this.diff_commonOverlap_(insertion, deletion);
|
|
5824
5881
|
if (overlap_length1 >= overlap_length2) {
|
|
5825
5882
|
if (overlap_length1 >= deletion.length / 2 || overlap_length1 >= insertion.length / 2) {
|
|
5826
|
-
diffs.splice(pointer, 0, new diff_match_patch2.Diff(
|
|
5883
|
+
diffs.splice(pointer, 0, new diff_match_patch2.Diff(
|
|
5884
|
+
DIFF_EQUAL,
|
|
5885
|
+
insertion.substring(0, overlap_length1)
|
|
5886
|
+
));
|
|
5827
5887
|
diffs[pointer - 1][1] = deletion.substring(0, deletion.length - overlap_length1);
|
|
5828
5888
|
diffs[pointer + 1][1] = insertion.substring(overlap_length1);
|
|
5829
5889
|
pointer++;
|
|
5830
5890
|
}
|
|
5831
5891
|
} else {
|
|
5832
5892
|
if (overlap_length2 >= deletion.length / 2 || overlap_length2 >= insertion.length / 2) {
|
|
5833
|
-
diffs.splice(pointer, 0, new diff_match_patch2.Diff(
|
|
5893
|
+
diffs.splice(pointer, 0, new diff_match_patch2.Diff(
|
|
5894
|
+
DIFF_EQUAL,
|
|
5895
|
+
deletion.substring(0, overlap_length2)
|
|
5896
|
+
));
|
|
5834
5897
|
diffs[pointer - 1][0] = DIFF_INSERT;
|
|
5835
5898
|
diffs[pointer - 1][1] = insertion.substring(0, insertion.length - overlap_length2);
|
|
5836
5899
|
diffs[pointer + 1][0] = DIFF_DELETE;
|
|
@@ -5953,7 +6016,11 @@ var require_diff_match_patch = __commonJS({
|
|
|
5953
6016
|
post_ins = true;
|
|
5954
6017
|
}
|
|
5955
6018
|
if (lastEquality && (pre_ins && pre_del && post_ins && post_del || lastEquality.length < this.Diff_EditCost / 2 && pre_ins + pre_del + post_ins + post_del == 3)) {
|
|
5956
|
-
diffs.splice(
|
|
6019
|
+
diffs.splice(
|
|
6020
|
+
equalities[equalitiesLength - 1],
|
|
6021
|
+
0,
|
|
6022
|
+
new diff_match_patch2.Diff(DIFF_DELETE, lastEquality)
|
|
6023
|
+
);
|
|
5957
6024
|
diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;
|
|
5958
6025
|
equalitiesLength--;
|
|
5959
6026
|
lastEquality = null;
|
|
@@ -6002,7 +6069,10 @@ var require_diff_match_patch = __commonJS({
|
|
|
6002
6069
|
if (pointer - count_delete - count_insert > 0 && diffs[pointer - count_delete - count_insert - 1][0] == DIFF_EQUAL) {
|
|
6003
6070
|
diffs[pointer - count_delete - count_insert - 1][1] += text_insert.substring(0, commonlength);
|
|
6004
6071
|
} else {
|
|
6005
|
-
diffs.splice(0, 0, new diff_match_patch2.Diff(
|
|
6072
|
+
diffs.splice(0, 0, new diff_match_patch2.Diff(
|
|
6073
|
+
DIFF_EQUAL,
|
|
6074
|
+
text_insert.substring(0, commonlength)
|
|
6075
|
+
));
|
|
6006
6076
|
pointer++;
|
|
6007
6077
|
}
|
|
6008
6078
|
text_insert = text_insert.substring(commonlength);
|
|
@@ -6018,11 +6088,19 @@ var require_diff_match_patch = __commonJS({
|
|
|
6018
6088
|
pointer -= count_delete + count_insert;
|
|
6019
6089
|
diffs.splice(pointer, count_delete + count_insert);
|
|
6020
6090
|
if (text_delete.length) {
|
|
6021
|
-
diffs.splice(
|
|
6091
|
+
diffs.splice(
|
|
6092
|
+
pointer,
|
|
6093
|
+
0,
|
|
6094
|
+
new diff_match_patch2.Diff(DIFF_DELETE, text_delete)
|
|
6095
|
+
);
|
|
6022
6096
|
pointer++;
|
|
6023
6097
|
}
|
|
6024
6098
|
if (text_insert.length) {
|
|
6025
|
-
diffs.splice(
|
|
6099
|
+
diffs.splice(
|
|
6100
|
+
pointer,
|
|
6101
|
+
0,
|
|
6102
|
+
new diff_match_patch2.Diff(DIFF_INSERT, text_insert)
|
|
6103
|
+
);
|
|
6026
6104
|
pointer++;
|
|
6027
6105
|
}
|
|
6028
6106
|
pointer++;
|
|
@@ -6317,14 +6395,20 @@ var require_diff_match_patch = __commonJS({
|
|
|
6317
6395
|
var padding = 0;
|
|
6318
6396
|
while (text.indexOf(pattern) != text.lastIndexOf(pattern) && pattern.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin) {
|
|
6319
6397
|
padding += this.Patch_Margin;
|
|
6320
|
-
pattern = text.substring(
|
|
6398
|
+
pattern = text.substring(
|
|
6399
|
+
patch.start2 - padding,
|
|
6400
|
+
patch.start2 + patch.length1 + padding
|
|
6401
|
+
);
|
|
6321
6402
|
}
|
|
6322
6403
|
padding += this.Patch_Margin;
|
|
6323
6404
|
var prefix = text.substring(patch.start2 - padding, patch.start2);
|
|
6324
6405
|
if (prefix) {
|
|
6325
6406
|
patch.diffs.unshift(new diff_match_patch2.Diff(DIFF_EQUAL, prefix));
|
|
6326
6407
|
}
|
|
6327
|
-
var suffix = text.substring(
|
|
6408
|
+
var suffix = text.substring(
|
|
6409
|
+
patch.start2 + patch.length1,
|
|
6410
|
+
patch.start2 + patch.length1 + padding
|
|
6411
|
+
);
|
|
6328
6412
|
if (suffix) {
|
|
6329
6413
|
patch.diffs.push(new diff_match_patch2.Diff(DIFF_EQUAL, suffix));
|
|
6330
6414
|
}
|
|
@@ -6445,9 +6529,17 @@ var require_diff_match_patch = __commonJS({
|
|
|
6445
6529
|
var start_loc;
|
|
6446
6530
|
var end_loc = -1;
|
|
6447
6531
|
if (text1.length > this.Match_MaxBits) {
|
|
6448
|
-
start_loc = this.match_main(
|
|
6532
|
+
start_loc = this.match_main(
|
|
6533
|
+
text,
|
|
6534
|
+
text1.substring(0, this.Match_MaxBits),
|
|
6535
|
+
expected_loc
|
|
6536
|
+
);
|
|
6449
6537
|
if (start_loc != -1) {
|
|
6450
|
-
end_loc = this.match_main(
|
|
6538
|
+
end_loc = this.match_main(
|
|
6539
|
+
text,
|
|
6540
|
+
text1.substring(text1.length - this.Match_MaxBits),
|
|
6541
|
+
expected_loc + text1.length - this.Match_MaxBits
|
|
6542
|
+
);
|
|
6451
6543
|
if (end_loc == -1 || start_loc >= end_loc) {
|
|
6452
6544
|
start_loc = -1;
|
|
6453
6545
|
}
|
|
@@ -6485,7 +6577,10 @@ var require_diff_match_patch = __commonJS({
|
|
|
6485
6577
|
if (mod[0] === DIFF_INSERT) {
|
|
6486
6578
|
text = text.substring(0, start_loc + index2) + mod[1] + text.substring(start_loc + index2);
|
|
6487
6579
|
} else if (mod[0] === DIFF_DELETE) {
|
|
6488
|
-
text = text.substring(0, start_loc + index2) + text.substring(start_loc + this.diff_xIndex(
|
|
6580
|
+
text = text.substring(0, start_loc + index2) + text.substring(start_loc + this.diff_xIndex(
|
|
6581
|
+
diffs,
|
|
6582
|
+
index1 + mod[1].length
|
|
6583
|
+
));
|
|
6489
6584
|
}
|
|
6490
6585
|
if (mod[0] !== DIFF_DELETE) {
|
|
6491
6586
|
index1 += mod[1].length;
|
|
@@ -6573,7 +6668,10 @@ var require_diff_match_patch = __commonJS({
|
|
|
6573
6668
|
patch.diffs.push(new diff_match_patch2.Diff(diff_type, diff_text));
|
|
6574
6669
|
bigpatch.diffs.shift();
|
|
6575
6670
|
} else {
|
|
6576
|
-
diff_text = diff_text.substring(
|
|
6671
|
+
diff_text = diff_text.substring(
|
|
6672
|
+
0,
|
|
6673
|
+
patch_size - patch.length1 - this.Patch_Margin
|
|
6674
|
+
);
|
|
6577
6675
|
patch.length1 += diff_text.length;
|
|
6578
6676
|
start1 += diff_text.length;
|
|
6579
6677
|
if (diff_type === DIFF_EQUAL) {
|
|
@@ -16316,7 +16414,7 @@ var require_connect = __commonJS({
|
|
|
16316
16414
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16317
16415
|
exports.connect = void 0;
|
|
16318
16416
|
var Subject_1 = require_Subject();
|
|
16319
|
-
var
|
|
16417
|
+
var innerFrom_1 = require_innerFrom();
|
|
16320
16418
|
var lift_1 = require_lift();
|
|
16321
16419
|
var fromSubscribable_1 = require_fromSubscribable();
|
|
16322
16420
|
var DEFAULT_CONFIG = {
|
|
@@ -16331,7 +16429,7 @@ var require_connect = __commonJS({
|
|
|
16331
16429
|
var connector = config.connector;
|
|
16332
16430
|
return lift_1.operate(function(source, subscriber) {
|
|
16333
16431
|
var subject = connector();
|
|
16334
|
-
|
|
16432
|
+
innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber);
|
|
16335
16433
|
subscriber.add(source.subscribe(subject));
|
|
16336
16434
|
});
|
|
16337
16435
|
}
|
|
@@ -16817,47 +16915,6 @@ var require_every = __commonJS({
|
|
|
16817
16915
|
}
|
|
16818
16916
|
});
|
|
16819
16917
|
|
|
16820
|
-
// node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js
|
|
16821
|
-
var require_exhaustAll = __commonJS({
|
|
16822
|
-
"node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(exports) {
|
|
16823
|
-
"use strict";
|
|
16824
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16825
|
-
exports.exhaustAll = void 0;
|
|
16826
|
-
var lift_1 = require_lift();
|
|
16827
|
-
var innerFrom_1 = require_innerFrom();
|
|
16828
|
-
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
16829
|
-
function exhaustAll() {
|
|
16830
|
-
return lift_1.operate(function(source, subscriber) {
|
|
16831
|
-
var isComplete = false;
|
|
16832
|
-
var innerSub = null;
|
|
16833
|
-
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(inner) {
|
|
16834
|
-
if (!innerSub) {
|
|
16835
|
-
innerSub = innerFrom_1.innerFrom(inner).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() {
|
|
16836
|
-
innerSub = null;
|
|
16837
|
-
isComplete && subscriber.complete();
|
|
16838
|
-
}));
|
|
16839
|
-
}
|
|
16840
|
-
}, function() {
|
|
16841
|
-
isComplete = true;
|
|
16842
|
-
!innerSub && subscriber.complete();
|
|
16843
|
-
}));
|
|
16844
|
-
});
|
|
16845
|
-
}
|
|
16846
|
-
exports.exhaustAll = exhaustAll;
|
|
16847
|
-
}
|
|
16848
|
-
});
|
|
16849
|
-
|
|
16850
|
-
// node_modules/rxjs/dist/cjs/internal/operators/exhaust.js
|
|
16851
|
-
var require_exhaust = __commonJS({
|
|
16852
|
-
"node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(exports) {
|
|
16853
|
-
"use strict";
|
|
16854
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16855
|
-
exports.exhaust = void 0;
|
|
16856
|
-
var exhaustAll_1 = require_exhaustAll();
|
|
16857
|
-
exports.exhaust = exhaustAll_1.exhaustAll;
|
|
16858
|
-
}
|
|
16859
|
-
});
|
|
16860
|
-
|
|
16861
16918
|
// node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js
|
|
16862
16919
|
var require_exhaustMap = __commonJS({
|
|
16863
16920
|
"node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(exports) {
|
|
@@ -16900,6 +16957,32 @@ var require_exhaustMap = __commonJS({
|
|
|
16900
16957
|
}
|
|
16901
16958
|
});
|
|
16902
16959
|
|
|
16960
|
+
// node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js
|
|
16961
|
+
var require_exhaustAll = __commonJS({
|
|
16962
|
+
"node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(exports) {
|
|
16963
|
+
"use strict";
|
|
16964
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16965
|
+
exports.exhaustAll = void 0;
|
|
16966
|
+
var exhaustMap_1 = require_exhaustMap();
|
|
16967
|
+
var identity_1 = require_identity();
|
|
16968
|
+
function exhaustAll() {
|
|
16969
|
+
return exhaustMap_1.exhaustMap(identity_1.identity);
|
|
16970
|
+
}
|
|
16971
|
+
exports.exhaustAll = exhaustAll;
|
|
16972
|
+
}
|
|
16973
|
+
});
|
|
16974
|
+
|
|
16975
|
+
// node_modules/rxjs/dist/cjs/internal/operators/exhaust.js
|
|
16976
|
+
var require_exhaust = __commonJS({
|
|
16977
|
+
"node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(exports) {
|
|
16978
|
+
"use strict";
|
|
16979
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16980
|
+
exports.exhaust = void 0;
|
|
16981
|
+
var exhaustAll_1 = require_exhaustAll();
|
|
16982
|
+
exports.exhaust = exhaustAll_1.exhaustAll;
|
|
16983
|
+
}
|
|
16984
|
+
});
|
|
16985
|
+
|
|
16903
16986
|
// node_modules/rxjs/dist/cjs/internal/operators/expand.js
|
|
16904
16987
|
var require_expand = __commonJS({
|
|
16905
16988
|
"node_modules/rxjs/dist/cjs/internal/operators/expand.js"(exports) {
|
|
@@ -18026,8 +18109,7 @@ var require_share = __commonJS({
|
|
|
18026
18109
|
};
|
|
18027
18110
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18028
18111
|
exports.share = void 0;
|
|
18029
|
-
var
|
|
18030
|
-
var take_1 = require_take();
|
|
18112
|
+
var innerFrom_1 = require_innerFrom();
|
|
18031
18113
|
var Subject_1 = require_Subject();
|
|
18032
18114
|
var Subscriber_1 = require_Subscriber();
|
|
18033
18115
|
var lift_1 = require_lift();
|
|
@@ -18039,19 +18121,19 @@ var require_share = __commonJS({
|
|
|
18039
18121
|
return new Subject_1.Subject();
|
|
18040
18122
|
} : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;
|
|
18041
18123
|
return function(wrapperSource) {
|
|
18042
|
-
var connection
|
|
18043
|
-
var resetConnection
|
|
18044
|
-
var subject
|
|
18124
|
+
var connection;
|
|
18125
|
+
var resetConnection;
|
|
18126
|
+
var subject;
|
|
18045
18127
|
var refCount = 0;
|
|
18046
18128
|
var hasCompleted = false;
|
|
18047
18129
|
var hasErrored = false;
|
|
18048
18130
|
var cancelReset = function() {
|
|
18049
18131
|
resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
|
|
18050
|
-
resetConnection =
|
|
18132
|
+
resetConnection = void 0;
|
|
18051
18133
|
};
|
|
18052
18134
|
var reset = function() {
|
|
18053
18135
|
cancelReset();
|
|
18054
|
-
connection = subject =
|
|
18136
|
+
connection = subject = void 0;
|
|
18055
18137
|
hasCompleted = hasErrored = false;
|
|
18056
18138
|
};
|
|
18057
18139
|
var resetAndUnsubscribe = function() {
|
|
@@ -18072,7 +18154,7 @@ var require_share = __commonJS({
|
|
|
18072
18154
|
}
|
|
18073
18155
|
});
|
|
18074
18156
|
dest.subscribe(subscriber);
|
|
18075
|
-
if (!connection) {
|
|
18157
|
+
if (!connection && refCount > 0) {
|
|
18076
18158
|
connection = new Subscriber_1.SafeSubscriber({
|
|
18077
18159
|
next: function(value) {
|
|
18078
18160
|
return dest.next(value);
|
|
@@ -18090,7 +18172,7 @@ var require_share = __commonJS({
|
|
|
18090
18172
|
dest.complete();
|
|
18091
18173
|
}
|
|
18092
18174
|
});
|
|
18093
|
-
|
|
18175
|
+
innerFrom_1.innerFrom(source).subscribe(connection);
|
|
18094
18176
|
}
|
|
18095
18177
|
})(wrapperSource);
|
|
18096
18178
|
};
|
|
@@ -18103,14 +18185,18 @@ var require_share = __commonJS({
|
|
|
18103
18185
|
}
|
|
18104
18186
|
if (on === true) {
|
|
18105
18187
|
reset();
|
|
18106
|
-
return
|
|
18188
|
+
return;
|
|
18107
18189
|
}
|
|
18108
18190
|
if (on === false) {
|
|
18109
|
-
return
|
|
18191
|
+
return;
|
|
18110
18192
|
}
|
|
18111
|
-
|
|
18112
|
-
|
|
18193
|
+
var onSubscriber = new Subscriber_1.SafeSubscriber({
|
|
18194
|
+
next: function() {
|
|
18195
|
+
onSubscriber.unsubscribe();
|
|
18196
|
+
reset();
|
|
18197
|
+
}
|
|
18113
18198
|
});
|
|
18199
|
+
return on.apply(void 0, __spreadArray([], __read(args))).subscribe(onSubscriber);
|
|
18114
18200
|
}
|
|
18115
18201
|
}
|
|
18116
18202
|
});
|
|
@@ -20751,7 +20837,10 @@ var require_minimatch = __commonJS({
|
|
|
20751
20837
|
};
|
|
20752
20838
|
Minimatch2.prototype.matchOne = function(file, pattern, partial) {
|
|
20753
20839
|
var options = this.options;
|
|
20754
|
-
this.debug(
|
|
20840
|
+
this.debug(
|
|
20841
|
+
"matchOne",
|
|
20842
|
+
{ "this": this, file, pattern }
|
|
20843
|
+
);
|
|
20755
20844
|
this.debug("matchOne", file.length, pattern.length);
|
|
20756
20845
|
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
20757
20846
|
this.debug("matchOne loop");
|
|
@@ -21399,12 +21488,14 @@ var _PythonSettings = class {
|
|
|
21399
21488
|
return import_path.default.isAbsolute(pathToCheck) ? pathToCheck : import_path.default.resolve(rootDir, pathToCheck);
|
|
21400
21489
|
}
|
|
21401
21490
|
initialize() {
|
|
21402
|
-
this.disposables.push(
|
|
21403
|
-
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21491
|
+
this.disposables.push(
|
|
21492
|
+
import_coc2.workspace.onDidChangeConfiguration((event) => {
|
|
21493
|
+
if (event.affectsConfiguration("python")) {
|
|
21494
|
+
const currentConfig = import_coc2.workspace.getConfiguration("python", import_coc2.workspace.root);
|
|
21495
|
+
this.update(currentConfig);
|
|
21496
|
+
}
|
|
21497
|
+
})
|
|
21498
|
+
);
|
|
21408
21499
|
const initialConfig = import_coc2.workspace.getConfiguration("python", import_coc2.workspace.root);
|
|
21409
21500
|
if (initialConfig) {
|
|
21410
21501
|
this.update(initialConfig);
|
|
@@ -21828,7 +21919,7 @@ var ProcessService = class {
|
|
|
21828
21919
|
return deferred.promise;
|
|
21829
21920
|
}
|
|
21830
21921
|
getDefaultOptions(options) {
|
|
21831
|
-
const defaultOptions =
|
|
21922
|
+
const defaultOptions = { ...options };
|
|
21832
21923
|
const execOptions = defaultOptions;
|
|
21833
21924
|
if (execOptions) {
|
|
21834
21925
|
const encoding = execOptions.encoding = typeof execOptions.encoding === "string" && execOptions.encoding.length > 0 ? execOptions.encoding : DEFAULT_ENCODING;
|
|
@@ -21836,9 +21927,9 @@ var ProcessService = class {
|
|
|
21836
21927
|
execOptions.encoding = encoding;
|
|
21837
21928
|
}
|
|
21838
21929
|
if (!defaultOptions.env || Object.keys(defaultOptions.env).length === 0) {
|
|
21839
|
-
defaultOptions.env =
|
|
21930
|
+
defaultOptions.env = { ...process.env };
|
|
21840
21931
|
} else {
|
|
21841
|
-
defaultOptions.env =
|
|
21932
|
+
defaultOptions.env = { ...defaultOptions.env };
|
|
21842
21933
|
}
|
|
21843
21934
|
defaultOptions.env.PYTHONUNBUFFERED = "1";
|
|
21844
21935
|
if (!defaultOptions.env.PYTHONIOENCODING) {
|
|
@@ -21856,11 +21947,11 @@ var PythonExecutionService = class {
|
|
|
21856
21947
|
return this.procService.exec(this.pythonSettings.pythonPath, ["-c", `import ${moduleName}`], { throwOnStdErr: true }).then(() => true).catch(() => false);
|
|
21857
21948
|
}
|
|
21858
21949
|
execObservable(args, options) {
|
|
21859
|
-
const opts =
|
|
21950
|
+
const opts = { ...options };
|
|
21860
21951
|
return this.procService.execObservable(this.pythonSettings.pythonPath, args, opts);
|
|
21861
21952
|
}
|
|
21862
21953
|
async exec(executionInfo, options) {
|
|
21863
|
-
const opts =
|
|
21954
|
+
const opts = { ...options };
|
|
21864
21955
|
const { execPath, moduleName, args } = executionInfo;
|
|
21865
21956
|
if (moduleName && moduleName.length > 0) {
|
|
21866
21957
|
const result = await this.procService.exec(this.pythonSettings.pythonPath, ["-m", moduleName, ...args], opts);
|
|
@@ -22181,12 +22272,12 @@ async function getPorts(options) {
|
|
|
22181
22272
|
if (exclude.has(port)) {
|
|
22182
22273
|
continue;
|
|
22183
22274
|
}
|
|
22184
|
-
let availablePort = await getAvailablePort(
|
|
22275
|
+
let availablePort = await getAvailablePort({ ...options, port }, hosts);
|
|
22185
22276
|
while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) {
|
|
22186
22277
|
if (port !== 0) {
|
|
22187
22278
|
throw new Locked(port);
|
|
22188
22279
|
}
|
|
22189
|
-
availablePort = await getAvailablePort(
|
|
22280
|
+
availablePort = await getAvailablePort({ ...options, port }, hosts);
|
|
22190
22281
|
}
|
|
22191
22282
|
lockedPorts.young.add(availablePort);
|
|
22192
22283
|
return availablePort;
|
|
@@ -23218,17 +23309,20 @@ var RefactorProxy = class {
|
|
|
23218
23309
|
const pythonToolsExecutionService = new PythonExecutionService();
|
|
23219
23310
|
const result = pythonToolsExecutionService.execObservable(args, { cwd });
|
|
23220
23311
|
this._process = result.proc;
|
|
23221
|
-
result.out.subscribe(
|
|
23222
|
-
|
|
23223
|
-
if (
|
|
23224
|
-
this._startedSuccessfully
|
|
23225
|
-
|
|
23312
|
+
result.out.subscribe(
|
|
23313
|
+
(output) => {
|
|
23314
|
+
if (output.source === "stdout") {
|
|
23315
|
+
if (!this._startedSuccessfully && output.out.startsWith("STARTED")) {
|
|
23316
|
+
this._startedSuccessfully = true;
|
|
23317
|
+
return this.initialized.resolve();
|
|
23318
|
+
}
|
|
23319
|
+
this.onData(output.out);
|
|
23320
|
+
} else {
|
|
23321
|
+
this.handleStdError(output.out);
|
|
23226
23322
|
}
|
|
23227
|
-
|
|
23228
|
-
|
|
23229
|
-
|
|
23230
|
-
}
|
|
23231
|
-
}, (error) => this.handleError(error));
|
|
23323
|
+
},
|
|
23324
|
+
(error) => this.handleError(error)
|
|
23325
|
+
);
|
|
23232
23326
|
return this.initialized.promise;
|
|
23233
23327
|
}
|
|
23234
23328
|
handleStdError(data) {
|
|
@@ -23556,7 +23650,10 @@ async function provideHover(document, position, token, next) {
|
|
|
23556
23650
|
return hover;
|
|
23557
23651
|
}
|
|
23558
23652
|
async function handleDiagnostics(uri, diagnostics, next) {
|
|
23559
|
-
next(
|
|
23653
|
+
next(
|
|
23654
|
+
uri,
|
|
23655
|
+
diagnostics.filter((d) => d.message !== '"__" is not accessed')
|
|
23656
|
+
);
|
|
23560
23657
|
}
|
|
23561
23658
|
async function activate(context) {
|
|
23562
23659
|
const pyrightCfg = import_coc24.workspace.getConfiguration("pyright");
|
|
@@ -23637,14 +23734,16 @@ async function activate(context) {
|
|
|
23637
23734
|
}
|
|
23638
23735
|
const textEditorCommands = ["pyright.organizeimports", "pyright.addoptionalforparam"];
|
|
23639
23736
|
textEditorCommands.forEach((commandName) => {
|
|
23640
|
-
context.subscriptions.push(
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23737
|
+
context.subscriptions.push(
|
|
23738
|
+
import_coc24.commands.registerCommand(commandName, async (offset) => {
|
|
23739
|
+
const doc = await import_coc24.workspace.document;
|
|
23740
|
+
const cmd = {
|
|
23741
|
+
command: commandName,
|
|
23742
|
+
arguments: [doc.uri.toString(), offset]
|
|
23743
|
+
};
|
|
23744
|
+
await client.sendRequest(method, cmd);
|
|
23745
|
+
})
|
|
23746
|
+
);
|
|
23648
23747
|
});
|
|
23649
23748
|
let command = "pyright.restartserver";
|
|
23650
23749
|
let disposable = import_coc24.commands.registerCommand(command, async () => {
|
|
@@ -23670,20 +23769,35 @@ async function activate(context) {
|
|
|
23670
23769
|
await client.sendRequest(method, cmd);
|
|
23671
23770
|
});
|
|
23672
23771
|
context.subscriptions.push(disposable);
|
|
23673
|
-
disposable = import_coc24.commands.registerCommand(
|
|
23674
|
-
|
|
23675
|
-
|
|
23676
|
-
|
|
23772
|
+
disposable = import_coc24.commands.registerCommand(
|
|
23773
|
+
"python.refactorExtractVariable",
|
|
23774
|
+
async (document, range) => {
|
|
23775
|
+
await extractVariable(context.extensionPath, document, range, outputChannel).catch(() => {
|
|
23776
|
+
});
|
|
23777
|
+
},
|
|
23778
|
+
null,
|
|
23779
|
+
true
|
|
23780
|
+
);
|
|
23677
23781
|
context.subscriptions.push(disposable);
|
|
23678
|
-
disposable = import_coc24.commands.registerCommand(
|
|
23679
|
-
|
|
23680
|
-
|
|
23681
|
-
|
|
23782
|
+
disposable = import_coc24.commands.registerCommand(
|
|
23783
|
+
"python.refactorExtractMethod",
|
|
23784
|
+
async (document, range) => {
|
|
23785
|
+
await extractMethod(context.extensionPath, document, range, outputChannel).catch(() => {
|
|
23786
|
+
});
|
|
23787
|
+
},
|
|
23788
|
+
null,
|
|
23789
|
+
true
|
|
23790
|
+
);
|
|
23682
23791
|
context.subscriptions.push(disposable);
|
|
23683
|
-
disposable = import_coc24.commands.registerCommand(
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23792
|
+
disposable = import_coc24.commands.registerCommand(
|
|
23793
|
+
"pyright.addImport",
|
|
23794
|
+
async (document, name, parent) => {
|
|
23795
|
+
await addImport(context.extensionPath, document, name, parent, outputChannel).catch(() => {
|
|
23796
|
+
});
|
|
23797
|
+
},
|
|
23798
|
+
null,
|
|
23799
|
+
true
|
|
23800
|
+
);
|
|
23687
23801
|
context.subscriptions.push(disposable);
|
|
23688
23802
|
disposable = import_coc24.commands.registerCommand("python.sortImports", async () => {
|
|
23689
23803
|
await sortImports(context.extensionPath, outputChannel).catch(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coc-pyright",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.265",
|
|
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",
|
|
@@ -667,6 +667,17 @@
|
|
|
667
667
|
"error"
|
|
668
668
|
]
|
|
669
669
|
},
|
|
670
|
+
"reportUnnecessaryContains": {
|
|
671
|
+
"type": "string",
|
|
672
|
+
"description": "Diagnostics for 'in' operation that is statically determined to be unnecessary. Such operations are sometimes indicative of a programming error.",
|
|
673
|
+
"default": "none",
|
|
674
|
+
"enum": [
|
|
675
|
+
"none",
|
|
676
|
+
"information",
|
|
677
|
+
"warning",
|
|
678
|
+
"error"
|
|
679
|
+
]
|
|
680
|
+
},
|
|
670
681
|
"reportAssertAlwaysTrue": {
|
|
671
682
|
"type": "string",
|
|
672
683
|
"description": "Diagnostics for 'assert' statement that will provably always assert. This can be indicative of a programming error.",
|
|
@@ -1419,6 +1430,6 @@
|
|
|
1419
1430
|
]
|
|
1420
1431
|
},
|
|
1421
1432
|
"dependencies": {
|
|
1422
|
-
"pyright": "^1.1.
|
|
1433
|
+
"pyright": "^1.1.265"
|
|
1423
1434
|
}
|
|
1424
1435
|
}
|
|
@@ -424,6 +424,12 @@
|
|
|
424
424
|
"title": "Controls reporting the use of '==' or '!=' comparisons that are unnecessary",
|
|
425
425
|
"default": "none"
|
|
426
426
|
},
|
|
427
|
+
"reportUnnecessaryContains": {
|
|
428
|
+
"$id": "#/properties/reportUnnecessaryContains",
|
|
429
|
+
"$ref": "#/definitions/diagnostic",
|
|
430
|
+
"title": "Controls reporting the use of 'in' operations that are unnecessary",
|
|
431
|
+
"default": "none"
|
|
432
|
+
},
|
|
427
433
|
"reportAssertAlwaysTrue": {
|
|
428
434
|
"$id": "#/properties/reportAssertAlwaysTrue",
|
|
429
435
|
"$ref": "#/definitions/diagnostic",
|