coc-pyright 1.1.191 → 1.1.210

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/README.md CHANGED
@@ -52,7 +52,7 @@ These configurations are used by `coc-pyright`, you need to set them in your `co
52
52
  | python.formatting.yapfArgs | Arguments passed to yapf | [] |
53
53
  | python.formatting.autopep8Path | Custom path to autopep8 | autopep8 |
54
54
  | python.formatting.autopep8Args | Arguments passed to autopep8 | [] |
55
- | python.linting.enabled | Whether to lint Python files | true |
55
+ | python.linting.enabled | Whether to lint Python files with external linters | true |
56
56
  | python.linting.flake8Enabled | Whether to lint with flake8 | false |
57
57
  | python.linting.banditEnabled | Whether to lint with bandit | false |
58
58
  | python.linting.mypyEnabled | Whether to lint with mypy | false |
@@ -71,6 +71,8 @@ These configurations are used by `coc-pyright`, you need to set them in your `co
71
71
  | pyright.completion.snippetSupport | Enable completion snippets support | true |
72
72
  | pyright.organizeimports.provider | Organize imports provider, `pyright` or `isort` | pyright |
73
73
 
74
+ Additional configuration options can be found in [package.json](./package.json).
75
+
74
76
  ## pyrightconfig.json
75
77
 
76
78
  Pyright supports [pyrightconfig.json](https://github.com/microsoft/pyright/blob/master/docs/configuration.md) that provide granular control over settings.
@@ -115,4 +117,4 @@ MIT
115
117
 
116
118
  ---
117
119
 
118
- > This extension is created by [create-coc-extension](https://github.com/fannheyward/create-coc-extension)
120
+ > This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)
package/lib/index.js CHANGED
@@ -20,24 +20,28 @@ var __spreadValues = (a, b) => {
20
20
  };
21
21
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
22
  var __commonJS = (cb, mod) => function __require() {
23
- return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
23
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
24
24
  };
25
25
  var __export = (target, all) => {
26
- __markAsModule(target);
27
26
  for (var name in all)
28
27
  __defProp(target, name, { get: all[name], enumerable: true });
29
28
  };
30
- var __reExport = (target, module2, desc) => {
29
+ var __reExport = (target, module2, copyDefault, desc) => {
31
30
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
32
31
  for (let key of __getOwnPropNames(module2))
33
- if (!__hasOwnProp.call(target, key) && key !== "default")
32
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
34
33
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
35
34
  }
36
35
  return target;
37
36
  };
38
- var __toModule = (module2) => {
39
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
37
+ var __toESM = (module2, isNodeMode) => {
38
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
40
39
  };
40
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
41
+ return (module2, temp) => {
42
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
43
+ };
44
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
41
45
 
42
46
  // node_modules/semver/internal/constants.js
43
47
  var require_constants = __commonJS({
@@ -1212,7 +1216,7 @@ var require_lru_cache = __commonJS({
1212
1216
  if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
1213
1217
  this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
1214
1218
  }
1215
- this[CACHE] = new Map();
1219
+ this[CACHE] = /* @__PURE__ */ new Map();
1216
1220
  this[LRU_LIST] = new Yallist();
1217
1221
  this[LENGTH] = 0;
1218
1222
  }
@@ -1443,7 +1447,7 @@ var require_range = __commonJS({
1443
1447
  const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
1444
1448
  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
1449
  const l = rangeList.length;
1446
- const rangeMap = new Map();
1450
+ const rangeMap = /* @__PURE__ */ new Map();
1447
1451
  for (const comp of rangeList) {
1448
1452
  if (isNullSet(comp))
1449
1453
  return [comp];
@@ -2162,7 +2166,7 @@ var require_subset = __commonJS({
2162
2166
  else
2163
2167
  dom = [new Comparator(">=0.0.0")];
2164
2168
  }
2165
- const eqSet = new Set();
2169
+ const eqSet = /* @__PURE__ */ new Set();
2166
2170
  let gt, lt2;
2167
2171
  for (const c of sub) {
2168
2172
  if (c.operator === ">" || c.operator === ">=")
@@ -2968,7 +2972,7 @@ var require_clone = __commonJS({
2968
2972
  if (obj instanceof Object)
2969
2973
  var copy = { __proto__: obj.__proto__ };
2970
2974
  else
2971
- var copy = Object.create(null);
2975
+ var copy = /* @__PURE__ */ Object.create(null);
2972
2976
  Object.getOwnPropertyNames(obj).forEach(function(key) {
2973
2977
  Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
2974
2978
  });
@@ -11004,15 +11008,19 @@ var require_Observable = __commonJS({
11004
11008
  var _this = this;
11005
11009
  promiseCtor = getPromiseCtor(promiseCtor);
11006
11010
  return new promiseCtor(function(resolve, reject) {
11007
- var subscription;
11008
- subscription = _this.subscribe(function(value) {
11009
- try {
11010
- next(value);
11011
- } catch (err) {
11012
- reject(err);
11013
- subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();
11014
- }
11015
- }, reject, resolve);
11011
+ var subscriber = new Subscriber_1.SafeSubscriber({
11012
+ next: function(value) {
11013
+ try {
11014
+ next(value);
11015
+ } catch (err) {
11016
+ reject(err);
11017
+ subscriber.unsubscribe();
11018
+ }
11019
+ },
11020
+ error: reject,
11021
+ complete: resolve
11022
+ });
11023
+ _this.subscribe(subscriber);
11016
11024
  });
11017
11025
  };
11018
11026
  Observable3.prototype._subscribe = function(subscriber) {
@@ -12226,7 +12234,9 @@ var require_AsapAction = __commonJS({
12226
12234
  if (delay != null && delay > 0 || delay == null && this.delay > 0) {
12227
12235
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
12228
12236
  }
12229
- if (scheduler.actions.length === 0) {
12237
+ if (!scheduler.actions.some(function(action) {
12238
+ return action.id === id;
12239
+ })) {
12230
12240
  immediateProvider_1.immediateProvider.clearImmediate(id);
12231
12241
  scheduler._scheduled = void 0;
12232
12242
  }
@@ -12368,20 +12378,19 @@ var require_AsapScheduler = __commonJS({
12368
12378
  }
12369
12379
  AsapScheduler2.prototype.flush = function(action) {
12370
12380
  this._active = true;
12381
+ var flushId = this._scheduled;
12371
12382
  this._scheduled = void 0;
12372
12383
  var actions = this.actions;
12373
12384
  var error;
12374
- var index = -1;
12375
12385
  action = action || actions.shift();
12376
- var count = actions.length;
12377
12386
  do {
12378
12387
  if (error = action.execute(action.state, action.delay)) {
12379
12388
  break;
12380
12389
  }
12381
- } while (++index < count && (action = actions.shift()));
12390
+ } while ((action = actions[0]) && action.id === flushId && actions.shift());
12382
12391
  this._active = false;
12383
12392
  if (error) {
12384
- while (++index < count && (action = actions.shift())) {
12393
+ while ((action = actions[0]) && action.id === flushId && actions.shift()) {
12385
12394
  action.unsubscribe();
12386
12395
  }
12387
12396
  throw error;
@@ -12593,7 +12602,9 @@ var require_AnimationFrameAction = __commonJS({
12593
12602
  if (delay != null && delay > 0 || delay == null && this.delay > 0) {
12594
12603
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
12595
12604
  }
12596
- if (scheduler.actions.length === 0) {
12605
+ if (!scheduler.actions.some(function(action) {
12606
+ return action.id === id;
12607
+ })) {
12597
12608
  animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
12598
12609
  scheduler._scheduled = void 0;
12599
12610
  }
@@ -12640,20 +12651,19 @@ var require_AnimationFrameScheduler = __commonJS({
12640
12651
  }
12641
12652
  AnimationFrameScheduler2.prototype.flush = function(action) {
12642
12653
  this._active = true;
12654
+ var flushId = this._scheduled;
12643
12655
  this._scheduled = void 0;
12644
12656
  var actions = this.actions;
12645
12657
  var error;
12646
- var index = -1;
12647
12658
  action = action || actions.shift();
12648
- var count = actions.length;
12649
12659
  do {
12650
12660
  if (error = action.execute(action.state, action.delay)) {
12651
12661
  break;
12652
12662
  }
12653
- } while (++index < count && (action = actions.shift()));
12663
+ } while ((action = actions[0]) && action.id === flushId && actions.shift());
12654
12664
  this._active = false;
12655
12665
  if (error) {
12656
- while (++index < count && (action = actions.shift())) {
12666
+ while ((action = actions[0]) && action.id === flushId && actions.shift()) {
12657
12667
  action.unsubscribe();
12658
12668
  }
12659
12669
  throw error;
@@ -16559,7 +16569,7 @@ var require_distinct = __commonJS({
16559
16569
  var noop_1 = require_noop();
16560
16570
  function distinct(keySelector, flushes) {
16561
16571
  return lift_1.operate(function(source, subscriber) {
16562
- var distinctKeys = new Set();
16572
+ var distinctKeys = /* @__PURE__ */ new Set();
16563
16573
  source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) {
16564
16574
  var key = keySelector ? keySelector(value) : value;
16565
16575
  if (!distinctKeys.has(key)) {
@@ -16994,7 +17004,7 @@ var require_groupBy = __commonJS({
16994
17004
  } else {
16995
17005
  duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector;
16996
17006
  }
16997
- var groups = new Map();
17007
+ var groups = /* @__PURE__ */ new Map();
16998
17008
  var notify = function(cb) {
16999
17009
  groups.forEach(cb);
17000
17010
  cb(subscriber);
@@ -17623,23 +17633,44 @@ var require_repeat = __commonJS({
17623
17633
  var empty_1 = require_empty2();
17624
17634
  var lift_1 = require_lift();
17625
17635
  var OperatorSubscriber_1 = require_OperatorSubscriber();
17626
- function repeat(count) {
17627
- if (count === void 0) {
17628
- count = Infinity;
17636
+ var innerFrom_1 = require_innerFrom();
17637
+ var timer_1 = require_timer();
17638
+ function repeat(countOrConfig) {
17639
+ var _a;
17640
+ var count = Infinity;
17641
+ var delay;
17642
+ if (countOrConfig != null) {
17643
+ if (typeof countOrConfig === "object") {
17644
+ _a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay;
17645
+ } else {
17646
+ count = countOrConfig;
17647
+ }
17629
17648
  }
17630
17649
  return count <= 0 ? function() {
17631
17650
  return empty_1.EMPTY;
17632
17651
  } : lift_1.operate(function(source, subscriber) {
17633
17652
  var soFar = 0;
17634
- var innerSub;
17635
- var subscribeForRepeat = function() {
17653
+ var sourceSub;
17654
+ var resubscribe = function() {
17655
+ sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();
17656
+ sourceSub = null;
17657
+ if (delay != null) {
17658
+ var notifier = typeof delay === "number" ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar));
17659
+ var notifierSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() {
17660
+ notifierSubscriber_1.unsubscribe();
17661
+ subscribeToSource();
17662
+ });
17663
+ notifier.subscribe(notifierSubscriber_1);
17664
+ } else {
17665
+ subscribeToSource();
17666
+ }
17667
+ };
17668
+ var subscribeToSource = function() {
17636
17669
  var syncUnsub = false;
17637
- innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() {
17670
+ sourceSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() {
17638
17671
  if (++soFar < count) {
17639
- if (innerSub) {
17640
- innerSub.unsubscribe();
17641
- innerSub = null;
17642
- subscribeForRepeat();
17672
+ if (sourceSub) {
17673
+ resubscribe();
17643
17674
  } else {
17644
17675
  syncUnsub = true;
17645
17676
  }
@@ -17648,12 +17679,10 @@ var require_repeat = __commonJS({
17648
17679
  }
17649
17680
  }));
17650
17681
  if (syncUnsub) {
17651
- innerSub.unsubscribe();
17652
- innerSub = null;
17653
- subscribeForRepeat();
17682
+ resubscribe();
17654
17683
  }
17655
17684
  };
17656
- subscribeForRepeat();
17685
+ subscribeToSource();
17657
17686
  });
17658
17687
  }
17659
17688
  exports.repeat = repeat;
@@ -18457,9 +18486,12 @@ var require_throttle = __commonJS({
18457
18486
  leading: true,
18458
18487
  trailing: false
18459
18488
  };
18460
- function throttle(durationSelector, _a) {
18461
- var _b = _a === void 0 ? exports.defaultThrottleConfig : _a, leading = _b.leading, trailing = _b.trailing;
18489
+ function throttle(durationSelector, config) {
18490
+ if (config === void 0) {
18491
+ config = exports.defaultThrottleConfig;
18492
+ }
18462
18493
  return lift_1.operate(function(source, subscriber) {
18494
+ var leading = config.leading, trailing = config.trailing;
18463
18495
  var hasValue = false;
18464
18496
  var sendValue = null;
18465
18497
  var throttled = null;
@@ -20952,17 +20984,18 @@ var require_named_js_regexp = __commonJS({
20952
20984
  });
20953
20985
 
20954
20986
  // src/index.ts
20955
- __export(exports, {
20987
+ var src_exports = {};
20988
+ __export(src_exports, {
20956
20989
  activate: () => activate
20957
20990
  });
20958
- var import_coc24 = __toModule(require("coc.nvim"));
20959
- var import_fs = __toModule(require("fs"));
20960
- var import_path5 = __toModule(require("path"));
20961
- var import_semver2 = __toModule(require_semver2());
20962
- var import_which2 = __toModule(require_which());
20991
+ var import_coc24 = require("coc.nvim");
20992
+ var import_fs = require("fs");
20993
+ var import_path5 = require("path");
20994
+ var import_semver2 = __toESM(require_semver2());
20995
+ var import_which2 = __toESM(require_which());
20963
20996
 
20964
20997
  // src/codeActionsProvider.ts
20965
- var import_coc = __toModule(require("coc.nvim"));
20998
+ var import_coc = require("coc.nvim");
20966
20999
  var PythonCodeActionProvider = class {
20967
21000
  wholeRange(doc, range) {
20968
21001
  const whole = import_coc.Range.create(0, 0, doc.lineCount, 0);
@@ -21087,16 +21120,15 @@ var PythonCodeActionProvider = class {
21087
21120
  };
21088
21121
 
21089
21122
  // src/configSettings.ts
21090
- var child_process = __toModule(require("child_process"));
21091
- var import_coc2 = __toModule(require("coc.nvim"));
21092
- var import_fs_extra = __toModule(require_lib());
21093
- var import_path = __toModule(require("path"));
21094
- var import_untildify = __toModule(require_untildify());
21095
- var import_which = __toModule(require_which());
21123
+ var child_process = __toESM(require("child_process"));
21124
+ var import_coc2 = require("coc.nvim");
21125
+ var import_fs_extra = __toESM(require_lib());
21126
+ var import_path = __toESM(require("path"));
21127
+ var import_untildify = __toESM(require_untildify());
21128
+ var import_which = __toESM(require_which());
21096
21129
 
21097
21130
  // src/systemVariables.ts
21098
- var Path = __toModule(require("path"));
21099
- "use strict";
21131
+ var Path = __toESM(require("path"));
21100
21132
  var _typeof = {
21101
21133
  number: "number",
21102
21134
  string: "string",
@@ -21155,7 +21187,7 @@ var AbstractSystemVariables = class {
21155
21187
  });
21156
21188
  }
21157
21189
  __resolveLiteral(values) {
21158
- const result = Object.create(null);
21190
+ const result = /* @__PURE__ */ Object.create(null);
21159
21191
  Object.keys(values).forEach((key) => {
21160
21192
  const value = values[key];
21161
21193
  result[key] = this.resolve(value);
@@ -21163,7 +21195,7 @@ var AbstractSystemVariables = class {
21163
21195
  return result;
21164
21196
  }
21165
21197
  __resolveAnyLiteral(values) {
21166
- const result = Object.create(null);
21198
+ const result = /* @__PURE__ */ Object.create(null);
21167
21199
  Object.keys(values).forEach((key) => {
21168
21200
  const value = values[key];
21169
21201
  result[key] = this.resolveAny(value);
@@ -21351,7 +21383,7 @@ var _PythonSettings = class {
21351
21383
  }
21352
21384
  };
21353
21385
  var PythonSettings = _PythonSettings;
21354
- PythonSettings.pythonSettings = new Map();
21386
+ PythonSettings.pythonSettings = /* @__PURE__ */ new Map();
21355
21387
  function getPythonExecutable(pythonPath) {
21356
21388
  pythonPath = (0, import_untildify.default)(pythonPath);
21357
21389
  if (pythonPath === "python" || pythonPath.indexOf(import_path.default.sep) === -1 || import_path.default.basename(pythonPath) === import_path.default.dirname(pythonPath)) {
@@ -21374,27 +21406,21 @@ function isValidPythonPath(pythonPath) {
21374
21406
  }
21375
21407
 
21376
21408
  // src/formatProvider.ts
21377
- var import_coc8 = __toModule(require("coc.nvim"));
21409
+ var import_coc8 = require("coc.nvim");
21378
21410
 
21379
21411
  // src/formatters/baseFormatter.ts
21380
- var import_coc4 = __toModule(require("coc.nvim"));
21381
- var import_fs_extra2 = __toModule(require_lib());
21382
- var import_md5 = __toModule(require_md5());
21383
- var import_path2 = __toModule(require("path"));
21384
- var import_semver = __toModule(require_semver2());
21385
- var import_util = __toModule(require("util"));
21412
+ var import_coc4 = require("coc.nvim");
21413
+ var import_fs_extra2 = __toESM(require_lib());
21414
+ var import_md5 = __toESM(require_md5());
21415
+ var import_path2 = __toESM(require("path"));
21416
+ var import_semver = __toESM(require_semver2());
21417
+ var import_util = require("util");
21386
21418
 
21387
21419
  // src/common.ts
21388
- var import_coc3 = __toModule(require("coc.nvim"));
21389
- var import_diff_match_patch = __toModule(require_diff_match_patch());
21390
- var import_os = __toModule(require("os"));
21420
+ var import_coc3 = require("coc.nvim");
21421
+ var import_diff_match_patch = __toESM(require_diff_match_patch());
21422
+ var import_os = require("os");
21391
21423
  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
21424
  var Edit = class {
21399
21425
  constructor(action, start) {
21400
21426
  this.action = action;
@@ -21403,11 +21429,11 @@ var Edit = class {
21403
21429
  }
21404
21430
  apply() {
21405
21431
  switch (this.action) {
21406
- case 1:
21432
+ case 1 /* Insert */:
21407
21433
  return import_coc3.TextEdit.insert(this.start, this.text);
21408
- case 0:
21434
+ case 0 /* Delete */:
21409
21435
  return import_coc3.TextEdit.del(import_coc3.Range.create(this.start, this.end));
21410
- case 2:
21436
+ case 2 /* Replace */:
21411
21437
  return import_coc3.TextEdit.replace(import_coc3.Range.create(this.start, this.end), this.text);
21412
21438
  default:
21413
21439
  return {
@@ -21440,17 +21466,17 @@ function getTextEditsInternal(before, diffs, startLine = 0) {
21440
21466
  switch (diffs[i][0]) {
21441
21467
  case dmp.DIFF_DELETE:
21442
21468
  if (edit === null) {
21443
- edit = new Edit(0, start);
21444
- } else if (edit.action !== 0) {
21469
+ edit = new Edit(0 /* Delete */, start);
21470
+ } else if (edit.action !== 0 /* Delete */) {
21445
21471
  throw new Error("cannot format due to an internal error.");
21446
21472
  }
21447
21473
  edit.end = { line, character };
21448
21474
  break;
21449
21475
  case dmp.DIFF_INSERT:
21450
21476
  if (edit === null) {
21451
- edit = new Edit(1, start);
21452
- } else if (edit.action === 0) {
21453
- edit.action = 2;
21477
+ edit = new Edit(1 /* Insert */, start);
21478
+ } else if (edit.action === 0 /* Delete */) {
21479
+ edit.action = 2 /* Replace */;
21454
21480
  }
21455
21481
  line = start.line;
21456
21482
  character = start.character;
@@ -21586,13 +21612,12 @@ function getWindowsLineEndingCount(document, offset) {
21586
21612
  }
21587
21613
 
21588
21614
  // src/processService.ts
21589
- var import_child_process = __toModule(require("child_process"));
21590
- var iconv = __toModule(require_lib2());
21591
- var import_os2 = __toModule(require("os"));
21592
- var import_rxjs = __toModule(require_cjs());
21615
+ var import_child_process = require("child_process");
21616
+ var iconv = __toESM(require_lib2());
21617
+ var import_os2 = require("os");
21618
+ var import_rxjs = __toESM(require_cjs());
21593
21619
 
21594
21620
  // src/async.ts
21595
- "use strict";
21596
21621
  var DeferredImpl = class {
21597
21622
  constructor(scope = null) {
21598
21623
  this.scope = scope;
@@ -21958,7 +21983,7 @@ var AutoPep8Formatter = class extends BaseFormatter {
21958
21983
  };
21959
21984
 
21960
21985
  // src/formatters/black.ts
21961
- var import_coc5 = __toModule(require("coc.nvim"));
21986
+ var import_coc5 = require("coc.nvim");
21962
21987
  var BlackFormatter = class extends BaseFormatter {
21963
21988
  constructor(pythonSettings, outputChannel) {
21964
21989
  super("black", pythonSettings, outputChannel);
@@ -22008,7 +22033,7 @@ var YapfFormatter = class extends BaseFormatter {
22008
22033
  };
22009
22034
 
22010
22035
  // src/formatters/darker.ts
22011
- var import_coc6 = __toModule(require("coc.nvim"));
22036
+ var import_coc6 = require("coc.nvim");
22012
22037
  var DarkerFormatter = class extends BaseFormatter {
22013
22038
  constructor(pythonSettings, outputChannel) {
22014
22039
  super("darker", pythonSettings, outputChannel);
@@ -22030,8 +22055,8 @@ var DarkerFormatter = class extends BaseFormatter {
22030
22055
  };
22031
22056
 
22032
22057
  // src/formatters/blackd.ts
22033
- var import_coc7 = __toModule(require("coc.nvim"));
22034
- var import_child_process2 = __toModule(require("child_process"));
22058
+ var import_coc7 = require("coc.nvim");
22059
+ var import_child_process2 = require("child_process");
22035
22060
  var BlackdFormatter = class extends BaseFormatter {
22036
22061
  constructor(pythonSettings, outputChannel) {
22037
22062
  super("blackd", pythonSettings, outputChannel);
@@ -22090,7 +22115,7 @@ var BlackdFormatter = class extends BaseFormatter {
22090
22115
  // src/formatProvider.ts
22091
22116
  var PythonFormattingEditProvider = class {
22092
22117
  constructor() {
22093
- this.formatters = new Map();
22118
+ this.formatters = /* @__PURE__ */ new Map();
22094
22119
  this.disposables = [];
22095
22120
  this.pythonSettings = PythonSettings.getInstance();
22096
22121
  this.outputChannel = import_coc8.window.createOutputChannel("coc-pyright-formatting");
@@ -22140,10 +22165,10 @@ var PythonFormattingEditProvider = class {
22140
22165
  };
22141
22166
 
22142
22167
  // src/isortProvider.ts
22143
- var import_coc9 = __toModule(require("coc.nvim"));
22144
- var import_fs_extra3 = __toModule(require_lib());
22145
- var import_md52 = __toModule(require_md5());
22146
- var path3 = __toModule(require("path"));
22168
+ var import_coc9 = require("coc.nvim");
22169
+ var import_fs_extra3 = __toESM(require_lib());
22170
+ var import_md52 = __toESM(require_md5());
22171
+ var path3 = __toESM(require("path"));
22147
22172
  function getTempFileWithDocumentContents2(document) {
22148
22173
  return new Promise((resolve, reject) => {
22149
22174
  const fsPath = import_coc9.Uri.parse(document.uri).fsPath;
@@ -22198,17 +22223,16 @@ ${message}`);
22198
22223
  }
22199
22224
 
22200
22225
  // src/linterProvider.ts
22201
- var import_coc21 = __toModule(require("coc.nvim"));
22226
+ var import_coc21 = require("coc.nvim");
22202
22227
 
22203
22228
  // src/linters/lintingEngine.ts
22204
- var import_coc20 = __toModule(require("coc.nvim"));
22205
- var import_fs_extra5 = __toModule(require_lib());
22206
- var import_minimatch = __toModule(require_minimatch());
22207
- var import_path4 = __toModule(require("path"));
22229
+ var import_coc20 = require("coc.nvim");
22230
+ var import_fs_extra5 = __toESM(require_lib());
22231
+ var import_minimatch = __toESM(require_minimatch());
22232
+ var import_path4 = __toESM(require("path"));
22208
22233
 
22209
22234
  // src/types.ts
22210
- var Product;
22211
- (function(Product2) {
22235
+ var Product = /* @__PURE__ */ ((Product2) => {
22212
22236
  Product2[Product2["pylint"] = 1] = "pylint";
22213
22237
  Product2[Product2["flake8"] = 2] = "flake8";
22214
22238
  Product2[Product2["pycodestyle"] = 3] = "pycodestyle";
@@ -22224,37 +22248,37 @@ var Product;
22224
22248
  Product2[Product2["darker"] = 13] = "darker";
22225
22249
  Product2[Product2["rope"] = 14] = "rope";
22226
22250
  Product2[Product2["blackd"] = 15] = "blackd";
22227
- })(Product || (Product = {}));
22228
- var LintMessageSeverity;
22229
- (function(LintMessageSeverity2) {
22251
+ return Product2;
22252
+ })(Product || {});
22253
+ var LintMessageSeverity = /* @__PURE__ */ ((LintMessageSeverity2) => {
22230
22254
  LintMessageSeverity2[LintMessageSeverity2["Hint"] = 0] = "Hint";
22231
22255
  LintMessageSeverity2[LintMessageSeverity2["Error"] = 1] = "Error";
22232
22256
  LintMessageSeverity2[LintMessageSeverity2["Warning"] = 2] = "Warning";
22233
22257
  LintMessageSeverity2[LintMessageSeverity2["Information"] = 3] = "Information";
22234
- })(LintMessageSeverity || (LintMessageSeverity = {}));
22258
+ return LintMessageSeverity2;
22259
+ })(LintMessageSeverity || {});
22235
22260
  var LinterErrors;
22236
- (function(LinterErrors2) {
22261
+ ((LinterErrors2) => {
22237
22262
  let pylint;
22238
- (function(pylint2) {
22263
+ ((pylint2) => {
22239
22264
  pylint2.InvalidSyntax = "E0001";
22240
22265
  })(pylint = LinterErrors2.pylint || (LinterErrors2.pylint = {}));
22241
22266
  let prospector;
22242
- (function(prospector2) {
22267
+ ((prospector2) => {
22243
22268
  prospector2.InvalidSyntax = "F999";
22244
22269
  })(prospector = LinterErrors2.prospector || (LinterErrors2.prospector = {}));
22245
22270
  let flake8;
22246
- (function(flake82) {
22271
+ ((flake82) => {
22247
22272
  flake82.InvalidSyntax = "E999";
22248
22273
  })(flake8 = LinterErrors2.flake8 || (LinterErrors2.flake8 = {}));
22249
22274
  })(LinterErrors || (LinterErrors = {}));
22250
22275
 
22251
22276
  // src/linters/bandit.ts
22252
- var import_coc11 = __toModule(require("coc.nvim"));
22277
+ var import_coc11 = require("coc.nvim");
22253
22278
 
22254
22279
  // src/linters/baseLinter.ts
22255
- var import_coc10 = __toModule(require("coc.nvim"));
22256
- var import_named_js_regexp = __toModule(require_named_js_regexp());
22257
- "use strict";
22280
+ var import_coc10 = require("coc.nvim");
22281
+ var import_named_js_regexp = __toESM(require_named_js_regexp());
22258
22282
  var REGEX = "(?<line>\\d+),(?<column>-?\\d+),(?<type>\\w+),(?<code>\\w+\\d+):(?<message>.*)\\r?(\\n|$)";
22259
22283
  function matchNamedRegEx(data, regex) {
22260
22284
  const compiledRegexp = (0, import_named_js_regexp.default)(regex, "g");
@@ -22303,13 +22327,13 @@ var BaseLinter = class {
22303
22327
  const severityName = categorySeverity[error];
22304
22328
  switch (severityName) {
22305
22329
  case "Error":
22306
- return LintMessageSeverity.Error;
22330
+ return 1 /* Error */;
22307
22331
  case "Hint":
22308
- return LintMessageSeverity.Hint;
22332
+ return 0 /* Hint */;
22309
22333
  case "Information":
22310
- return LintMessageSeverity.Information;
22334
+ return 3 /* Information */;
22311
22335
  case "Warning":
22312
- return LintMessageSeverity.Warning;
22336
+ return 2 /* Warning */;
22313
22337
  default: {
22314
22338
  if (LintMessageSeverity[severityName]) {
22315
22339
  return LintMessageSeverity[severityName];
@@ -22317,7 +22341,7 @@ var BaseLinter = class {
22317
22341
  }
22318
22342
  }
22319
22343
  }
22320
- return LintMessageSeverity.Information;
22344
+ return 3 /* Information */;
22321
22345
  }
22322
22346
  async run(args, document, cancellation, regEx = REGEX) {
22323
22347
  if (!this.info.isEnabled(import_coc10.Uri.parse(document.uri))) {
@@ -22370,11 +22394,10 @@ var BaseLinter = class {
22370
22394
  };
22371
22395
 
22372
22396
  // src/linters/bandit.ts
22373
- "use strict";
22374
22397
  var severityMapping = {
22375
- LOW: LintMessageSeverity.Information,
22376
- MEDIUM: LintMessageSeverity.Warning,
22377
- HIGH: LintMessageSeverity.Error
22398
+ LOW: 3 /* Information */,
22399
+ MEDIUM: 2 /* Warning */,
22400
+ HIGH: 1 /* Error */
22378
22401
  };
22379
22402
  var Bandit = class extends BaseLinter {
22380
22403
  constructor(info, outputChannel) {
@@ -22390,7 +22413,7 @@ var Bandit = class extends BaseLinter {
22390
22413
  };
22391
22414
 
22392
22415
  // src/linters/flake8.ts
22393
- var import_coc12 = __toModule(require("coc.nvim"));
22416
+ var import_coc12 = require("coc.nvim");
22394
22417
  var COLUMN_OFF_SET = 1;
22395
22418
  var Flake8 = class extends BaseLinter {
22396
22419
  constructor(info, outputChannel) {
@@ -22406,7 +22429,7 @@ var Flake8 = class extends BaseLinter {
22406
22429
  };
22407
22430
 
22408
22431
  // src/linters/linterInfo.ts
22409
- var path4 = __toModule(require("path"));
22432
+ var path4 = __toESM(require("path"));
22410
22433
  var LinterInfo = class {
22411
22434
  constructor(product, id, configService, configFileNames = []) {
22412
22435
  this.configService = configService;
@@ -22457,7 +22480,7 @@ var LinterInfo = class {
22457
22480
  };
22458
22481
 
22459
22482
  // src/linters/mypy.ts
22460
- var import_coc13 = __toModule(require("coc.nvim"));
22483
+ var import_coc13 = require("coc.nvim");
22461
22484
  var COLUMN_OFF_SET2 = 1;
22462
22485
  var REGEX2 = "(?<file>[^:]+):(?<line>\\d+)(:(?<column>\\d+))?: (?<type>\\w+): (?<message>.*)\\r?(\\n|$)";
22463
22486
  var MyPy = class extends BaseLinter {
@@ -22475,8 +22498,8 @@ var MyPy = class extends BaseLinter {
22475
22498
  };
22476
22499
 
22477
22500
  // src/linters/prospector.ts
22478
- var import_coc14 = __toModule(require("coc.nvim"));
22479
- var import_path3 = __toModule(require("path"));
22501
+ var import_coc14 = require("coc.nvim");
22502
+ var import_path3 = __toESM(require("path"));
22480
22503
  var Prospector = class extends BaseLinter {
22481
22504
  constructor(info, outputChannel) {
22482
22505
  super(info, outputChannel);
@@ -22509,7 +22532,7 @@ var Prospector = class extends BaseLinter {
22509
22532
  };
22510
22533
 
22511
22534
  // src/linters/pycodestyle.ts
22512
- var import_coc15 = __toModule(require("coc.nvim"));
22535
+ var import_coc15 = require("coc.nvim");
22513
22536
  var COLUMN_OFF_SET3 = 1;
22514
22537
  var PyCodeStyle = class extends BaseLinter {
22515
22538
  constructor(info, outputChannel) {
@@ -22525,8 +22548,8 @@ var PyCodeStyle = class extends BaseLinter {
22525
22548
  };
22526
22549
 
22527
22550
  // src/linters/pydocstyle.ts
22528
- var import_coc16 = __toModule(require("coc.nvim"));
22529
- var path6 = __toModule(require("path"));
22551
+ var import_coc16 = require("coc.nvim");
22552
+ var path6 = __toESM(require("path"));
22530
22553
  var PyDocStyle = class extends BaseLinter {
22531
22554
  constructor(info, outputChannel) {
22532
22555
  super(info, outputChannel);
@@ -22537,7 +22560,7 @@ var PyDocStyle = class extends BaseLinter {
22537
22560
  return [];
22538
22561
  const messages = await this.run([import_coc16.Uri.parse(document.uri).fsPath], document, cancellation);
22539
22562
  messages.forEach((msg) => {
22540
- msg.severity = LintMessageSeverity.Warning;
22563
+ msg.severity = 2 /* Warning */;
22541
22564
  });
22542
22565
  return messages;
22543
22566
  }
@@ -22590,7 +22613,7 @@ var PyDocStyle = class extends BaseLinter {
22590
22613
  };
22591
22614
 
22592
22615
  // src/linters/pylama.ts
22593
- var import_coc17 = __toModule(require("coc.nvim"));
22616
+ var import_coc17 = require("coc.nvim");
22594
22617
  var REGEX3 = "(?<file>.py):(?<line>\\d+):(?<column>\\d+): \\[(?<type>\\w+)\\] (?<code>\\w\\d+):? (?<message>.*)\\r?(\\n|$)";
22595
22618
  var COLUMN_OFF_SET4 = 1;
22596
22619
  var PyLama = class extends BaseLinter {
@@ -22600,14 +22623,14 @@ var PyLama = class extends BaseLinter {
22600
22623
  async runLinter(document, cancellation) {
22601
22624
  const messages = await this.run(["--format=parsable", import_coc17.Uri.parse(document.uri).fsPath], document, cancellation, REGEX3);
22602
22625
  messages.forEach((msg) => {
22603
- msg.severity = LintMessageSeverity.Warning;
22626
+ msg.severity = 2 /* Warning */;
22604
22627
  });
22605
22628
  return messages;
22606
22629
  }
22607
22630
  };
22608
22631
 
22609
22632
  // src/linters/pylint.ts
22610
- var import_coc18 = __toModule(require("coc.nvim"));
22633
+ var import_coc18 = require("coc.nvim");
22611
22634
  var REGEX4 = "(?<line>\\d+),(?<column>-?\\d+),(?<type>\\w+),(?<code>[\\w-]+):(?<message>.*)\\r?(\\n|$)";
22612
22635
  var Pylint = class extends BaseLinter {
22613
22636
  constructor(info, outputChannel) {
@@ -22625,9 +22648,9 @@ var Pylint = class extends BaseLinter {
22625
22648
  };
22626
22649
 
22627
22650
  // src/linters/pytype.ts
22628
- var import_coc19 = __toModule(require("coc.nvim"));
22629
- var import_fs_extra4 = __toModule(require_lib());
22630
- var path7 = __toModule(require("path"));
22651
+ var import_coc19 = require("coc.nvim");
22652
+ var import_fs_extra4 = __toESM(require_lib());
22653
+ var path7 = __toESM(require("path"));
22631
22654
  var pytypecfg = "pytype.cfg";
22632
22655
  var REGEX5 = '^File \\"(?<file>.*)\\", line (?<line>\\d+), in (<module>|\\w+): (?<message>.*)\\r?(\\n|$)';
22633
22656
  var pytypeErrors = [
@@ -22694,11 +22717,11 @@ var Pytype = class extends BaseLinter {
22694
22717
  });
22695
22718
  for (const msg of messages) {
22696
22719
  msg.type = "Hint";
22697
- msg.severity = LintMessageSeverity.Hint;
22720
+ msg.severity = 0 /* Hint */;
22698
22721
  const match = /\[(.*)\]/g.exec(msg.message);
22699
22722
  if (match && match.length >= 2) {
22700
22723
  if (pytypeErrors.includes(match[1])) {
22701
- msg.severity = LintMessageSeverity.Error;
22724
+ msg.severity = 1 /* Error */;
22702
22725
  }
22703
22726
  }
22704
22727
  }
@@ -22734,19 +22757,18 @@ var Pytype = class extends BaseLinter {
22734
22757
  };
22735
22758
 
22736
22759
  // src/linters/lintingEngine.ts
22737
- "use strict";
22738
22760
  var PYTHON = { language: "python" };
22739
- var lintSeverityToVSSeverity = new Map();
22740
- lintSeverityToVSSeverity.set(LintMessageSeverity.Error, import_coc20.DiagnosticSeverity.Error);
22741
- lintSeverityToVSSeverity.set(LintMessageSeverity.Hint, import_coc20.DiagnosticSeverity.Hint);
22742
- lintSeverityToVSSeverity.set(LintMessageSeverity.Information, import_coc20.DiagnosticSeverity.Information);
22743
- lintSeverityToVSSeverity.set(LintMessageSeverity.Warning, import_coc20.DiagnosticSeverity.Warning);
22761
+ var lintSeverityToVSSeverity = /* @__PURE__ */ new Map();
22762
+ lintSeverityToVSSeverity.set(1 /* Error */, import_coc20.DiagnosticSeverity.Error);
22763
+ lintSeverityToVSSeverity.set(0 /* Hint */, import_coc20.DiagnosticSeverity.Hint);
22764
+ lintSeverityToVSSeverity.set(3 /* Information */, import_coc20.DiagnosticSeverity.Information);
22765
+ lintSeverityToVSSeverity.set(2 /* Warning */, import_coc20.DiagnosticSeverity.Warning);
22744
22766
  var DisabledLinter = class {
22745
22767
  constructor(configService) {
22746
22768
  this.configService = configService;
22747
22769
  }
22748
22770
  get info() {
22749
- return new LinterInfo(Product.pylint, "pylint", this.configService);
22771
+ return new LinterInfo(1 /* pylint */, "pylint", this.configService);
22750
22772
  }
22751
22773
  async lint() {
22752
22774
  return [];
@@ -22754,20 +22776,20 @@ var DisabledLinter = class {
22754
22776
  };
22755
22777
  var LintingEngine = class {
22756
22778
  constructor() {
22757
- this.pendingLintings = new Map();
22779
+ this.pendingLintings = /* @__PURE__ */ new Map();
22758
22780
  this.outputChannel = import_coc20.window.createOutputChannel("coc-pyright-linting");
22759
22781
  this.diagnosticCollection = import_coc20.languages.createDiagnosticCollection("python");
22760
22782
  this.configService = PythonSettings.getInstance();
22761
22783
  this.linters = [
22762
- new LinterInfo(Product.bandit, "bandit", this.configService),
22763
- new LinterInfo(Product.flake8, "flake8", this.configService),
22764
- new LinterInfo(Product.pylint, "pylint", this.configService, [".pylintrc", "pylintrc"]),
22765
- new LinterInfo(Product.mypy, "mypy", this.configService),
22766
- new LinterInfo(Product.pycodestyle, "pycodestyle", this.configService),
22767
- new LinterInfo(Product.prospector, "prospector", this.configService),
22768
- new LinterInfo(Product.pydocstyle, "pydocstyle", this.configService),
22769
- new LinterInfo(Product.pylama, "pylama", this.configService),
22770
- new LinterInfo(Product.pytype, "pytype", this.configService)
22784
+ new LinterInfo(8 /* bandit */, "bandit", this.configService),
22785
+ new LinterInfo(2 /* flake8 */, "flake8", this.configService),
22786
+ new LinterInfo(1 /* pylint */, "pylint", this.configService, [".pylintrc", "pylintrc"]),
22787
+ new LinterInfo(7 /* mypy */, "mypy", this.configService),
22788
+ new LinterInfo(3 /* pycodestyle */, "pycodestyle", this.configService),
22789
+ new LinterInfo(5 /* prospector */, "prospector", this.configService),
22790
+ new LinterInfo(6 /* pydocstyle */, "pydocstyle", this.configService),
22791
+ new LinterInfo(4 /* pylama */, "pylama", this.configService),
22792
+ new LinterInfo(9 /* pytype */, "pytype", this.configService)
22771
22793
  ];
22772
22794
  }
22773
22795
  get diagnostics() {
@@ -22891,23 +22913,23 @@ var LintingEngine = class {
22891
22913
  }
22892
22914
  const error = "Linter manager: Unknown linter";
22893
22915
  switch (info.product) {
22894
- case Product.bandit:
22916
+ case 8 /* bandit */:
22895
22917
  return new Bandit(info, outputChannel);
22896
- case Product.flake8:
22918
+ case 2 /* flake8 */:
22897
22919
  return new Flake8(info, outputChannel);
22898
- case Product.pylint:
22920
+ case 1 /* pylint */:
22899
22921
  return new Pylint(info, outputChannel);
22900
- case Product.mypy:
22922
+ case 7 /* mypy */:
22901
22923
  return new MyPy(info, outputChannel);
22902
- case Product.prospector:
22924
+ case 5 /* prospector */:
22903
22925
  return new Prospector(info, outputChannel);
22904
- case Product.pylama:
22926
+ case 4 /* pylama */:
22905
22927
  return new PyLama(info, outputChannel);
22906
- case Product.pydocstyle:
22928
+ case 6 /* pydocstyle */:
22907
22929
  return new PyDocStyle(info, outputChannel);
22908
- case Product.pycodestyle:
22930
+ case 3 /* pycodestyle */:
22909
22931
  return new PyCodeStyle(info, outputChannel);
22910
- case Product.pytype:
22932
+ case 9 /* pytype */:
22911
22933
  return new Pytype(info, outputChannel);
22912
22934
  default:
22913
22935
  break;
@@ -22967,11 +22989,11 @@ var LinterProvider = class {
22967
22989
  };
22968
22990
 
22969
22991
  // src/refactorProvider.ts
22970
- var import_coc23 = __toModule(require("coc.nvim"));
22992
+ var import_coc23 = require("coc.nvim");
22971
22993
 
22972
22994
  // src/refactorProxy.ts
22973
- var import_coc22 = __toModule(require("coc.nvim"));
22974
- var path9 = __toModule(require("path"));
22995
+ var import_coc22 = require("coc.nvim");
22996
+ var path9 = __toESM(require("path"));
22975
22997
  var RefactorProxy = class {
22976
22998
  constructor(extensionDir, pythonSettings, workspaceRoot) {
22977
22999
  this.pythonSettings = pythonSettings;
@@ -23302,7 +23324,7 @@ function toJSONObject(obj) {
23302
23324
  if (Array.isArray(obj)) {
23303
23325
  return obj.map(toJSONObject);
23304
23326
  } else if (typeof obj === "object") {
23305
- const res = Object.create(null);
23327
+ const res = /* @__PURE__ */ Object.create(null);
23306
23328
  for (const key in obj) {
23307
23329
  if (Object.prototype.hasOwnProperty.call(obj, key)) {
23308
23330
  res[key] = toJSONObject(obj[key]);
@@ -23549,6 +23571,7 @@ var ImportCompletionProvider = class {
23549
23571
  return items;
23550
23572
  }
23551
23573
  };
23574
+ module.exports = __toCommonJS(src_exports);
23552
23575
  // Annotate the CommonJS export names for ESM import in node:
23553
23576
  0 && (module.exports = {
23554
23577
  activate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coc-pyright",
3
- "version": "1.1.191",
3
+ "version": "1.1.210",
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.4.0",
46
- "@typescript-eslint/parser": "^5.4.0",
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.13.15",
50
- "eslint": "^8.3.0",
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.2",
60
+ "typescript": "^4.5.3",
61
61
  "untildify": "^4.0.0",
62
62
  "which": "^2.0.2"
63
63
  },
@@ -468,6 +468,17 @@
468
468
  "error"
469
469
  ]
470
470
  },
471
+ "reportInconsistentConstructor": {
472
+ "type": "string",
473
+ "description": "Diagnostics for __init__ and __new__ methods whose signatures are inconsistent.",
474
+ "default": "none",
475
+ "enum": [
476
+ "none",
477
+ "information",
478
+ "warning",
479
+ "error"
480
+ ]
481
+ },
471
482
  "reportOverlappingOverload": {
472
483
  "type": "string",
473
484
  "description": "Diagnostics for function overloads that overlap in signature and obscure each other or have incompatible return types.",
@@ -479,6 +490,17 @@
479
490
  "error"
480
491
  ]
481
492
  },
493
+ "reportMissingSuperCall": {
494
+ "type": "string",
495
+ "description": "Diagnostics for missing call to parent class for inherited `__init__` methods.",
496
+ "default": "none",
497
+ "enum": [
498
+ "none",
499
+ "information",
500
+ "warning",
501
+ "error"
502
+ ]
503
+ },
482
504
  "reportUninitializedInstanceVariable": {
483
505
  "type": "string",
484
506
  "description": "Diagnostics for instance variables that are not declared or initialized within class body or `__init__` method.",
@@ -710,6 +732,17 @@
710
732
  "error"
711
733
  ]
712
734
  },
735
+ "reportUnsupportedDunderAll": {
736
+ "type": "string",
737
+ "description": "Diagnostics for unsupported operations performed on __all__.",
738
+ "default": "warning",
739
+ "enum": [
740
+ "none",
741
+ "information",
742
+ "warning",
743
+ "error"
744
+ ]
745
+ },
713
746
  "reportUnusedCallResult": {
714
747
  "type": "string",
715
748
  "description": "Diagnostics for call expressions whose results are not consumed and are not None.",
@@ -732,10 +765,10 @@
732
765
  "error"
733
766
  ]
734
767
  },
735
- "reportUnsupportedDunderAll": {
768
+ "reportUnnecessaryTypeIgnoreComment": {
736
769
  "type": "string",
737
- "description": "Diagnostics for unsupported operations performed on __all__.",
738
- "default": "warning",
770
+ "description": "Diagnostics for '# type: ignore' comments that have no effect.",
771
+ "default": "none",
739
772
  "enum": [
740
773
  "none",
741
774
  "information",
@@ -777,7 +810,7 @@
777
810
  "python.linting.enabled": {
778
811
  "type": "boolean",
779
812
  "default": true,
780
- "description": "Whether to lint Python files.",
813
+ "description": "Whether to lint Python files with external linters, you can also disable diagnostics from Pyright by `pyright.disableDiagnostics` to use external linters only.",
781
814
  "scope": "resource"
782
815
  },
783
816
  "python.linting.flake8Args": {
@@ -1347,6 +1380,6 @@
1347
1380
  ]
1348
1381
  },
1349
1382
  "dependencies": {
1350
- "pyright": "^1.1.191"
1383
+ "pyright": "^1.1.210"
1351
1384
  }
1352
1385
  }
@@ -305,12 +305,24 @@
305
305
  "title": "Controls reporting of overrides in subclasses that redefine a variable in an incompatible way",
306
306
  "default": "none"
307
307
  },
308
+ "reportInconsistentConstructor": {
309
+ "$id": "#/properties/reportInconsistentConstructor",
310
+ "$ref": "#/definitions/diagnostic",
311
+ "title": "Controls reporting of __init__ and __new__ methods whose signatures are inconsistent",
312
+ "default": "none"
313
+ },
308
314
  "reportOverlappingOverload": {
309
315
  "$id": "#/properties/reportOverlappingOverload",
310
316
  "$ref": "#/definitions/diagnostic",
311
317
  "title": "Controls reporting of function overloads that overlap in signature and obscure each other or do not agree on return type",
312
318
  "default": "none"
313
319
  },
320
+ "reportMissingSuperCall": {
321
+ "$id": "#/properties/reportMissingSuperCall",
322
+ "$ref": "#/definitions/diagnostic",
323
+ "title": "Controls reporting of missing call to parent class for inherited `__init__` methods",
324
+ "default": "none"
325
+ },
314
326
  "reportUninitializedInstanceVariable": {
315
327
  "$id": "#/properties/reportUninitializedInstanceVariable",
316
328
  "$ref": "#/definitions/diagnostic",
@@ -455,12 +467,18 @@
455
467
  "title": "Controls reporting of call expressions that returns Coroutine whose results are not consumed",
456
468
  "default": "error"
457
469
  },
470
+ "reportUnnecessaryTypeIgnoreComment": {
471
+ "$id": "#/properties/reportUnnecessaryTypeIgnoreComment",
472
+ "$ref": "#/definitions/diagnostic",
473
+ "title": "Controls reporting of '# type: ignore' comments that have no effect'",
474
+ "default": "none"
475
+ },
458
476
  "extraPaths": {
459
- "$id": "#/properties/executionEnvironments/items/properties/extraPaths",
477
+ "$id": "#/properties/extraPaths",
460
478
  "type": "array",
461
479
  "title": "Additional import search resolution paths",
462
480
  "items": {
463
- "$id": "#/properties/executionEnvironments/items/properties/extraPaths/items",
481
+ "$id": "#/properties/extraPaths/items",
464
482
  "type": "string",
465
483
  "title": "Additional import search resolution path",
466
484
  "default": "",
@@ -542,7 +560,7 @@
542
560
  }
543
561
  },
544
562
  "pythonVersion": {
545
- "$id": "#/properties/pythonVersion",
563
+ "$id": "#/properties/executionEnvironments/items/properties/pythonVersion",
546
564
  "type": "string",
547
565
  "title": "Python version to assume during type analysis",
548
566
  "default": "",
@@ -552,7 +570,7 @@
552
570
  "pattern": "^3\\.[0-9]+$"
553
571
  },
554
572
  "pythonPlatform": {
555
- "$id": "#/properties/pythonPlatform",
573
+ "$id": "#/properties/executionEnvironments/items/properties/pythonPlatform",
556
574
  "type": "string",
557
575
  "title": "Python platform to assume during type analysis",
558
576
  "default": "",