coc-pyright 1.1.253 → 1.1.262

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 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
  };
@@ -3448,7 +3432,7 @@ var require_make_dir = __commonJS({
3448
3432
  const defaults = { mode: 511 };
3449
3433
  if (typeof options === "number")
3450
3434
  return options;
3451
- return __spreadValues(__spreadValues({}, defaults), options).mode;
3435
+ return { ...defaults, ...options }.mode;
3452
3436
  };
3453
3437
  module2.exports.makeDir = async (dir, options) => {
3454
3438
  checkPath(dir);
@@ -5090,7 +5074,18 @@ var require_move2 = __commonJS({
5090
5074
  var require_lib = __commonJS({
5091
5075
  "node_modules/fs-extra/lib/index.js"(exports, module2) {
5092
5076
  "use strict";
5093
- module2.exports = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, require_fs()), require_copy2()), require_empty()), require_ensure()), require_json()), require_mkdirs()), require_move2()), require_output_file()), require_path_exists()), require_remove());
5077
+ module2.exports = {
5078
+ ...require_fs(),
5079
+ ...require_copy2(),
5080
+ ...require_empty(),
5081
+ ...require_ensure(),
5082
+ ...require_json(),
5083
+ ...require_mkdirs(),
5084
+ ...require_move2(),
5085
+ ...require_output_file(),
5086
+ ...require_path_exists(),
5087
+ ...require_remove()
5088
+ };
5094
5089
  }
5095
5090
  });
5096
5091
 
@@ -21828,7 +21823,7 @@ var ProcessService = class {
21828
21823
  return deferred.promise;
21829
21824
  }
21830
21825
  getDefaultOptions(options) {
21831
- const defaultOptions = __spreadValues({}, options);
21826
+ const defaultOptions = { ...options };
21832
21827
  const execOptions = defaultOptions;
21833
21828
  if (execOptions) {
21834
21829
  const encoding = execOptions.encoding = typeof execOptions.encoding === "string" && execOptions.encoding.length > 0 ? execOptions.encoding : DEFAULT_ENCODING;
@@ -21836,9 +21831,9 @@ var ProcessService = class {
21836
21831
  execOptions.encoding = encoding;
21837
21832
  }
21838
21833
  if (!defaultOptions.env || Object.keys(defaultOptions.env).length === 0) {
21839
- defaultOptions.env = __spreadValues({}, process.env);
21834
+ defaultOptions.env = { ...process.env };
21840
21835
  } else {
21841
- defaultOptions.env = __spreadValues({}, defaultOptions.env);
21836
+ defaultOptions.env = { ...defaultOptions.env };
21842
21837
  }
21843
21838
  defaultOptions.env.PYTHONUNBUFFERED = "1";
21844
21839
  if (!defaultOptions.env.PYTHONIOENCODING) {
@@ -21856,11 +21851,11 @@ var PythonExecutionService = class {
21856
21851
  return this.procService.exec(this.pythonSettings.pythonPath, ["-c", `import ${moduleName}`], { throwOnStdErr: true }).then(() => true).catch(() => false);
21857
21852
  }
21858
21853
  execObservable(args, options) {
21859
- const opts = __spreadValues({}, options);
21854
+ const opts = { ...options };
21860
21855
  return this.procService.execObservable(this.pythonSettings.pythonPath, args, opts);
21861
21856
  }
21862
21857
  async exec(executionInfo, options) {
21863
- const opts = __spreadValues({}, options);
21858
+ const opts = { ...options };
21864
21859
  const { execPath, moduleName, args } = executionInfo;
21865
21860
  if (moduleName && moduleName.length > 0) {
21866
21861
  const result = await this.procService.exec(this.pythonSettings.pythonPath, ["-m", moduleName, ...args], opts);
@@ -22181,12 +22176,12 @@ async function getPorts(options) {
22181
22176
  if (exclude.has(port)) {
22182
22177
  continue;
22183
22178
  }
22184
- let availablePort = await getAvailablePort(__spreadProps(__spreadValues({}, options), { port }), hosts);
22179
+ let availablePort = await getAvailablePort({ ...options, port }, hosts);
22185
22180
  while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) {
22186
22181
  if (port !== 0) {
22187
22182
  throw new Locked(port);
22188
22183
  }
22189
- availablePort = await getAvailablePort(__spreadProps(__spreadValues({}, options), { port }), hosts);
22184
+ availablePort = await getAvailablePort({ ...options, port }, hosts);
22190
22185
  }
22191
22186
  lockedPorts.young.add(availablePort);
22192
22187
  return availablePort;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coc-pyright",
3
- "version": "1.1.253",
3
+ "version": "1.1.262",
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",
@@ -425,6 +425,17 @@
425
425
  "error"
426
426
  ]
427
427
  },
428
+ "reportTypeCommentUsage": {
429
+ "type": "string",
430
+ "description": "Diagnostics for usage of deprecated type comments.",
431
+ "default": "none",
432
+ "enum": [
433
+ "none",
434
+ "information",
435
+ "warning",
436
+ "error"
437
+ ]
438
+ },
428
439
  "reportPrivateImportUsage": {
429
440
  "type": "string",
430
441
  "description": "Diagnostics for incorrect usage of symbol imported from a \"py.typed\" module that is not re-exported from that module.",
@@ -656,6 +667,17 @@
656
667
  "error"
657
668
  ]
658
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
+ },
659
681
  "reportAssertAlwaysTrue": {
660
682
  "type": "string",
661
683
  "description": "Diagnostics for 'assert' statement that will provably always assert. This can be indicative of a programming error.",
@@ -1408,6 +1430,6 @@
1408
1430
  ]
1409
1431
  },
1410
1432
  "dependencies": {
1411
- "pyright": "^1.1.253"
1433
+ "pyright": "^1.1.262"
1412
1434
  }
1413
1435
  }
@@ -67,6 +67,17 @@
67
67
  "pattern": "^(.*)$"
68
68
  }
69
69
  },
70
+ "defineConstant": {
71
+ "$id": "#/properties/defineConstant",
72
+ "type": "object",
73
+ "title": "Identifiers that should be treated as constants",
74
+ "properties": {
75
+ },
76
+ "additionalProperties": {
77
+ "type": ["string", "boolean"],
78
+ "title": "Value of constant (boolean or string)"
79
+ }
80
+ },
70
81
  "typeCheckingMode": {
71
82
  "$id": "#/properties/typeCheckingMode",
72
83
  "type": "string",
@@ -281,6 +292,12 @@
281
292
  "title": "Controls reporting of private variables and functions used outside of the owning class or module and usage of protected members outside of subclasses",
282
293
  "default": "none"
283
294
  },
295
+ "reportTypeCommentUsage": {
296
+ "$id": "#/properties/reportTypeCommentUsage",
297
+ "$ref": "#/definitions/diagnostic",
298
+ "title": "Controls reporting of deprecated type comment usage",
299
+ "default": "none"
300
+ },
284
301
  "reportPrivateImportUsage": {
285
302
  "$id": "#/properties/reportPrivateImportUsage",
286
303
  "$ref": "#/definitions/diagnostic",
@@ -407,6 +424,12 @@
407
424
  "title": "Controls reporting the use of '==' or '!=' comparisons that are unnecessary",
408
425
  "default": "none"
409
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
+ },
410
433
  "reportAssertAlwaysTrue": {
411
434
  "$id": "#/properties/reportAssertAlwaysTrue",
412
435
  "$ref": "#/definitions/diagnostic",