coc-pyright 1.1.293 → 1.1.296

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.
Files changed (3) hide show
  1. package/diff.mjs +25 -0
  2. package/lib/index.js +6206 -5503
  3. package/package.json +22 -4
package/diff.mjs ADDED
@@ -0,0 +1,25 @@
1
+ import { readFile } from 'fs';
2
+ import { promisify } from 'util';
3
+
4
+ async function diff() {
5
+ const text = await promisify(readFile)('./package.json');
6
+ const config = JSON.parse(text);
7
+ const overrides = config.contributes.configuration.properties['python.analysis.diagnosticSeverityOverrides'].properties;
8
+
9
+ const schemaText = await promisify(readFile)('./schemas/pyrightconfig.schema.json');
10
+ const schema = JSON.parse(schemaText);
11
+ for (const [key, val] of Object.entries(schema.properties)) {
12
+ if (val['$ref'] === '#/definitions/diagnostic') {
13
+ if (!overrides[key]) {
14
+ console.error('missing:', key);
15
+ } else {
16
+ const obj = overrides[key];
17
+ if (obj.default !== val.default) {
18
+ console.error(`${key}, package.json value: ${obj.default}, schema value: ${val.default}`);
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+
25
+ await diff();