From f2f897a86460bfe81b59ad65c6ab81b5eaa9750d Mon Sep 17 00:00:00 2001 From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 07:00:01 +0000 Subject: [PATCH 1/8] Add Pyright as a subschema of PyProject --- src/schemas/json/pyproject.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/schemas/json/pyproject.json b/src/schemas/json/pyproject.json index 9d117d4ff9d..077a6800b88 100644 --- a/src/schemas/json/pyproject.json +++ b/src/schemas/json/pyproject.json @@ -122,6 +122,9 @@ }, "pdm": { "$ref": "https://json.schemastore.org/partial-pdm.json" + }, + "pyright": { + "$ref": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json" } }, "examples": [ From f521ee45fec11054f7b37ed1956965a005088be4 Mon Sep 17 00:00:00 2001 From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 07:48:05 +0000 Subject: [PATCH 2/8] Fix --- src/api/json/catalog.json | 2 +- src/schema-validation.json | 2 + src/schemas/json/partial-pyright.json | 639 ++++++++++++++++++++++++++ src/schemas/json/pyproject.json | 2 +- 4 files changed, 643 insertions(+), 2 deletions(-) create mode 100644 src/schemas/json/partial-pyright.json diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index db53601e8d0..fb4f94ebdb5 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -3492,7 +3492,7 @@ "name": "Pyright", "description": "Pyright Configuration", "fileMatch": ["pyrightconfig.json"], - "url": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json" + "url": "https://json.schemastore.org/partial-pyright.json" }, { "name": "Qgoda", diff --git a/src/schema-validation.json b/src/schema-validation.json index 54b774c1aed..9f7bb665821 100644 --- a/src/schema-validation.json +++ b/src/schema-validation.json @@ -221,6 +221,7 @@ "lsdlschema-3.5.json", "lsdlschema.json", "nodemon.json", + "partial-pyright.json", "sarif-2.1.0-rtm.0.json", "sarif-2.1.0-rtm.1.json", "sarif-2.1.0-rtm.2.json", @@ -828,6 +829,7 @@ "partial-mypy.json", "partial-pdm.json", "partial-poetry.json", + "partial-pyright.json", "partial-scikit-build.json", "partial-setuptools.json", "poetry.json", diff --git a/src/schemas/json/partial-pyright.json b/src/schemas/json/partial-pyright.json new file mode 100644 index 00000000000..e810f265458 --- /dev/null +++ b/src/schemas/json/partial-pyright.json @@ -0,0 +1,639 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://json-schema.org/partial-pyright.json", + "description": "Pyright Configuration Schema", + "type": "object", + "definitions": { + "diagnostic": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": ["none", "information", "warning", "error"] + } + ] + } + }, + "properties": { + "include": { + "$id": "#/properties/include", + "type": "array", + "title": "Files and directories included in type analysis", + "items": { + "$id": "#/properties/include/items", + "type": "string", + "title": "File or directory to include in type analysis", + "pattern": "^(.*)$" + } + }, + "exclude": { + "$id": "#/properties/exclude", + "type": "array", + "title": "Files and directories excluded from type analysis", + "items": { + "$id": "#/properties/exclude/items", + "type": "string", + "title": "File or directory to exclude from type analysis", + "pattern": "^(.*)$" + } + }, + "ignore": { + "$id": "#/properties/ignore", + "type": "array", + "title": "Files and directories whose diagnostics are suppressed", + "items": { + "$id": "#/properties/ignore/items", + "type": "string", + "title": "File or directory where diagnostics should be suppressed", + "pattern": "^(.*)$" + } + }, + "strict": { + "$id": "#/properties/strict", + "type": "array", + "title": "Files and directories that should use 'strict' type checking rules", + "items": { + "$id": "#/properties/strict/items", + "type": "string", + "title": "File or directory that should use 'strict' type checking rules", + "pattern": "^(.*)$" + } + }, + "defineConstant": { + "$id": "#/properties/defineConstant", + "type": "object", + "title": "Identifiers that should be treated as constants", + "properties": {}, + "additionalProperties": { + "type": ["string", "boolean"], + "title": "Value of constant (boolean or string)" + } + }, + "typeCheckingMode": { + "$id": "#/properties/typeCheckingMode", + "type": "string", + "enum": ["off", "basic", "standard", "strict"], + "title": "Specifies the default rule set to use for type checking", + "default": "standard" + }, + "useLibraryCodeForTypes": { + "$id": "#/properties/useLibraryCodeForTypes", + "type": "boolean", + "title": "Use library implementations to extract type information when type stub is not present", + "default": true + }, + "typeshedPath": { + "$id": "#/properties/typeshedPath", + "type": "string", + "title": "Path to directory containing typeshed type stub files", + "default": "", + "pattern": "^(.*)$" + }, + "stubPath": { + "$id": "#/properties/stubPath", + "type": "string", + "title": "Path to directory containing custom type stub files", + "default": "", + "examples": ["src/typestubs"], + "pattern": "^(.*)$" + }, + "disableBytesTypePromotions": { + "$id": "#/properties/disableBytesTypePromotions", + "type": "boolean", + "title": "Do not treat `bytearray` and `memoryview` as implicit subtypes of `bytes`", + "default": false + }, + "strictListInference": { + "$id": "#/properties/strictListInference", + "type": "boolean", + "title": "Infer strict types for list expressions", + "default": false + }, + "strictSetInference": { + "$id": "#/properties/strictSetInference", + "type": "boolean", + "title": "Infer strict types for set expressions", + "default": false + }, + "strictDictionaryInference": { + "$id": "#/properties/strictDictionaryInference", + "type": "boolean", + "title": "Infer strict types for dictionary expressions", + "default": false + }, + "analyzeUnannotatedFunctions": { + "$id": "#/properties/analyzeUnannotatedFunctions", + "type": "boolean", + "title": "Analyze and report diagnostics for functions that have no annotations", + "default": true + }, + "strictParameterNoneValue": { + "$id": "#/properties/strictParameterNoneValue", + "type": "boolean", + "title": "Allow implicit Optional when default parameter value is None", + "default": true + }, + "enableExperimentalFeatures": { + "$id": "#/properties/enableExperimentalFeatures", + "type": "boolean", + "title": "Enable the use of experimental features that are not part of the Python typing spec", + "default": false + }, + "enableTypeIgnoreComments": { + "$id": "#/properties/enableTypeIgnoreComments", + "type": "boolean", + "title": "Allow \"# type: ignore\" comments", + "default": true + }, + "deprecateTypingAliases": { + "$id": "#/properties/deprecateTypingAliases", + "type": "boolean", + "title": "Treat typing-specific aliases to standard types as deprecated", + "default": false + }, + "reportGeneralTypeIssues": { + "$id": "#/properties/reportGeneralTypeIssues", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of general type issues", + "default": "error" + }, + "reportPropertyTypeMismatch": { + "$id": "#/properties/reportPropertyTypeMismatch", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of property getter/setter type mismatches", + "default": "none" + }, + "reportFunctionMemberAccess": { + "$id": "#/properties/reportFunctionMemberAccess", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of member accesses on function objects", + "default": "error" + }, + "reportMissingImports": { + "$id": "#/properties/reportMissingImports", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of imports that cannot be resolved", + "default": "error" + }, + "reportMissingModuleSource": { + "$id": "#/properties/reportMissingModuleSource", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of imports that cannot be resolved to source files", + "default": "warning" + }, + "reportMissingTypeStubs": { + "$id": "#/properties/reportMissingTypeStubs", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of imports that cannot be resolved to type stub files", + "default": "warning" + }, + "reportImportCycles": { + "$id": "#/properties/reportImportCycles", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of module imports that create cycles in import graph", + "default": "none" + }, + "reportUnusedImport": { + "$id": "#/properties/reportUnusedImport", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of imported symbols that are not referenced within the source file", + "default": "none" + }, + "reportUnusedClass": { + "$id": "#/properties/reportUnusedClass", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of private classes that are not accessed", + "default": "none" + }, + "reportUnusedFunction": { + "$id": "#/properties/reportUnusedFunction", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of private functions or methods that are not accessed", + "default": "none" + }, + "reportUnusedVariable": { + "$id": "#/properties/reportUnusedVariable", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of local variables that are not accessed", + "default": "none" + }, + "reportDuplicateImport": { + "$id": "#/properties/reportDuplicateImport", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of symbols or modules that are imported more than once", + "default": "none" + }, + "reportWildcardImportFromLibrary": { + "$id": "#/properties/reportWildcardImportFromLibrary", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of wlidcard import from external library", + "default": "warning" + }, + "reportOptionalSubscript": { + "$id": "#/properties/reportOptionalSubscript", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to subscript (index) a variable with Optional type", + "default": "error" + }, + "reportOptionalMemberAccess": { + "$id": "#/properties/reportOptionalMemberAccess", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to access a member of a variable with Optional type", + "default": "error" + }, + "reportOptionalCall": { + "$id": "#/properties/reportOptionalCall", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to call a variable with Optional type", + "default": "error" + }, + "reportOptionalIterable": { + "$id": "#/properties/reportOptionalIterable", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to use an Optional type as an iterable value", + "default": "error" + }, + "reportOptionalContextManager": { + "$id": "#/properties/reportOptionalContextManager", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to use an Optional type as a parameter to a with statement", + "default": "error" + }, + "reportOptionalOperand": { + "$id": "#/properties/reportOptionalOperand", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to use an Optional type as an operand for a binary or unary operator", + "default": "error" + }, + "reportTypedDictNotRequiredAccess": { + "$id": "#/properties/reportTypedDictNotRequiredAccess", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to access a non-required key in a TypedDict without a check for its presence", + "default": "error" + }, + "reportUntypedFunctionDecorator": { + "$id": "#/properties/reportUntypedFunctionDecorator", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of function decorators without type annotations, which obscure function types", + "default": "none" + }, + "reportUntypedClassDecorator": { + "$id": "#/properties/reportUntypedClassDecorator", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of class decorators without type annotations, which obscure class types", + "default": "none" + }, + "reportUntypedBaseClass": { + "$id": "#/properties/reportUntypedBaseClass", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of a base class of an unknown type, which obscures most type checking for the class", + "default": "none" + }, + "reportUntypedNamedTuple": { + "$id": "#/properties/reportUntypedNamedTuple", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of a named tuple definition that does not contain type information", + "default": "none" + }, + "reportPrivateUsage": { + "$id": "#/properties/reportPrivateUsage", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of private variables and functions used outside of the owning class or module and usage of protected members outside of subclasses", + "default": "none" + }, + "reportTypeCommentUsage": { + "$id": "#/properties/reportTypeCommentUsage", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of deprecated type comment usage", + "default": "none" + }, + "reportPrivateImportUsage": { + "$id": "#/properties/reportPrivateImportUsage", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of improper usage of symbol imported from a \"py.typed\" module that is not re-exported from that module", + "default": "error" + }, + "reportConstantRedefinition": { + "$id": "#/properties/reportConstantRedefinition", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to redefine variables that are in all-caps", + "default": "none" + }, + "reportDeprecated": { + "$id": "#/properties/reportDeprecated", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of use of deprecated class or function", + "default": "none" + }, + "reportIncompatibleMethodOverride": { + "$id": "#/properties/reportIncompatibleMethodOverride", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of method overrides in subclasses that redefine the method in an incompatible way", + "default": "error" + }, + "reportIncompatibleVariableOverride": { + "$id": "#/properties/reportIncompatibleVariableOverride", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of overrides in subclasses that redefine a variable in an incompatible way", + "default": "error" + }, + "reportInconsistentConstructor": { + "$id": "#/properties/reportInconsistentConstructor", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of __init__ and __new__ methods whose signatures are inconsistent", + "default": "none" + }, + "reportOverlappingOverload": { + "$id": "#/properties/reportOverlappingOverload", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of function overloads that overlap in signature and obscure each other or do not agree on return type", + "default": "error" + }, + "reportMissingSuperCall": { + "$id": "#/properties/reportMissingSuperCall", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of missing call to parent class for inherited `__init__` methods", + "default": "none" + }, + "reportUninitializedInstanceVariable": { + "$id": "#/properties/reportUninitializedInstanceVariable", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of instance variables that are not initialized in the constructor", + "default": "none" + }, + "reportInvalidStringEscapeSequence": { + "$id": "#/properties/reportInvalidStringEscapeSequence", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of invalid escape sequences used within string literals", + "default": "warning" + }, + "reportUnknownParameterType": { + "$id": "#/properties/reportUnknownParameterType", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting input and return parameters whose types are unknown", + "default": "none" + }, + "reportUnknownArgumentType": { + "$id": "#/properties/reportUnknownArgumentType", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting argument expressions whose types are unknown", + "default": "none" + }, + "reportUnknownLambdaType": { + "$id": "#/properties/reportUnknownLambdaType", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting input and return parameters for lambdas whose types are unknown", + "default": "none" + }, + "reportUnknownVariableType": { + "$id": "#/properties/reportUnknownVariableType", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting local variables whose types are unknown", + "default": "none" + }, + "reportUnknownMemberType": { + "$id": "#/properties/reportUnknownMemberType", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting class and instance variables whose types are unknown", + "default": "none" + }, + "reportMissingParameterType": { + "$id": "#/properties/reportMissingParameterType", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting input parameters that are missing a type annotation", + "default": "none" + }, + "reportMissingTypeArgument": { + "$id": "#/properties/reportMissingTypeArgument", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting generic class reference with missing type arguments", + "default": "none" + }, + "reportInvalidTypeVarUse": { + "$id": "#/properties/reportInvalidTypeVarUse", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting improper use of type variables within function signatures", + "default": "warning" + }, + "reportCallInDefaultInitializer": { + "$id": "#/properties/reportCallInDefaultInitializer", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting usage of function calls within a default value initializer expression", + "default": "none" + }, + "reportUnnecessaryIsInstance": { + "$id": "#/properties/reportUnnecessaryIsInstance", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting calls to 'isinstance' or 'issubclass' where the result is statically determined to be always true", + "default": "none" + }, + "reportUnnecessaryCast": { + "$id": "#/properties/reportUnnecessaryCast", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting calls to 'cast' that are unnecessary", + "default": "none" + }, + "reportUnnecessaryComparison": { + "$id": "#/properties/reportUnnecessaryComparison", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting the use of '==' or '!=' comparisons that are unnecessary", + "default": "none" + }, + "reportUnnecessaryContains": { + "$id": "#/properties/reportUnnecessaryContains", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting the use of 'in' operations that are unnecessary", + "default": "none" + }, + "reportAssertAlwaysTrue": { + "$id": "#/properties/reportAssertAlwaysTrue", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting assert expressions that will always evaluate to true", + "default": "warning" + }, + "reportSelfClsParameterName": { + "$id": "#/properties/reportSelfClsParameterName", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting assert expressions that will always evaluate to true", + "default": "warning" + }, + "reportImplicitStringConcatenation": { + "$id": "#/properties/reportImplicitStringConcatenation", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting usage of implicit concatenation of string literals", + "default": "warning" + }, + "reportUnboundVariable": { + "$id": "#/properties/reportUnboundVariable", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to use an unbound or possibly unbound variable", + "default": "error" + }, + "reportUndefinedVariable": { + "$id": "#/properties/reportUndefinedVariable", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of attempts to use an undefined variable", + "default": "error" + }, + "reportInvalidStubStatement": { + "$id": "#/properties/reportInvalidStubStatement", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of type stub statements that do not conform to PEP 484", + "default": "none" + }, + "reportIncompleteStub": { + "$id": "#/properties/reportIncompleteStub", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of incomplete type stubs that declare a module-level __getattr__ function", + "default": "none" + }, + "reportUnsupportedDunderAll": { + "$id": "#/properties/reportUnsupportedDunderAll", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of unsupported operations performed on __all__", + "default": "warning" + }, + "reportUnusedCallResult": { + "$id": "#/properties/reportUnusedCallResult", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of call expressions whose results are not consumed", + "default": "none" + }, + "reportUnusedCoroutine": { + "$id": "#/properties/reportUnusedCoroutine", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of call expressions that returns Coroutine whose results are not consumed", + "default": "error" + }, + "reportUnusedExpression": { + "$id": "#/properties/reportUnusedExpression", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of simple expressions whose value is not used in any way", + "default": "warning" + }, + "reportUnnecessaryTypeIgnoreComment": { + "$id": "#/properties/reportUnnecessaryTypeIgnoreComment", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of '# type: ignore' comments that have no effect'", + "default": "none" + }, + "reportMatchNotExhaustive": { + "$id": "#/properties/reportMatchNotExhaustive", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of 'match' statements that do not exhaustively match all possible values", + "default": "none" + }, + "reportShadowedImports": { + "$id": "#/properties/reportShadowedImports", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting of shadowed imports of stdlib modules", + "default": "none" + }, + "reportImplicitOverride": { + "$id": "#/properties/reportImplicitOverride", + "$ref": "#/definitions/diagnostic", + "title": "Controls reporting overridden methods that are missing an `@override` decorator", + "default": "none" + }, + "extraPaths": { + "$id": "#/properties/extraPaths", + "type": "array", + "title": "Additional import search resolution paths", + "items": { + "$id": "#/properties/extraPaths/items", + "type": "string", + "title": "Additional import search resolution path", + "default": "", + "pattern": "^(.*)$" + } + }, + "pythonVersion": { + "$id": "#/properties/pythonVersion", + "type": "string", + "title": "Python version to assume during type analysis", + "default": "", + "examples": ["3.7"], + "pattern": "^3\\.[0-9]+$" + }, + "pythonPlatform": { + "$id": "#/properties/pythonPlatform", + "type": "string", + "title": "Python platform to assume during type analysis", + "default": "", + "examples": ["Linux"], + "pattern": "^(Linux|Windows|Darwin|All)$" + }, + "venvPath": { + "$id": "#/properties/venvPath", + "type": "string", + "title": "Path to directory containing a folder of virtual environments", + "default": "", + "pattern": "^(.*)$" + }, + "venv": { + "$id": "#/properties/venv", + "type": "string", + "title": "Name of virtual environment subdirectory within venvPath", + "default": "", + "examples": ["python37"], + "pattern": "^(.*)$" + }, + "verboseOutput": { + "$id": "#/properties/verboseOutput", + "type": "boolean", + "title": "Output verbose logging", + "default": false + }, + "executionEnvironments": { + "$id": "#/properties/executionEnvironments", + "type": "array", + "title": "Analysis settings to use for specified subdirectories of code", + "items": { + "$id": "#/properties/executionEnvironments/items", + "type": "object", + "title": "Analysis settings to use for specified subdirectories of code", + "required": ["root"], + "properties": { + "root": { + "$id": "#/properties/executionEnvironments/items/properties/root", + "type": "string", + "title": "Path to code subdirectory to which these settings apply", + "default": "", + "pattern": "^(.*)$" + }, + "extraPaths": { + "$id": "#/properties/executionEnvironments/items/properties/extraPaths", + "type": "array", + "title": "Additional import search resolution paths", + "items": { + "$id": "#/properties/executionEnvironments/items/properties/extraPaths/items", + "type": "string", + "title": "Additional import search resolution path", + "default": "", + "pattern": "^(.*)$" + } + }, + "pythonVersion": { + "$id": "#/properties/executionEnvironments/items/properties/pythonVersion", + "type": "string", + "title": "Python version to assume during type analysis", + "default": "", + "examples": ["3.7"], + "pattern": "^3\\.[0-9]+$" + }, + "pythonPlatform": { + "$id": "#/properties/executionEnvironments/items/properties/pythonPlatform", + "type": "string", + "title": "Python platform to assume during type analysis", + "default": "", + "examples": ["Linux"], + "pattern": "^(Linux|Windows|Darwin|All)$" + } + } + } + }, + "overrides": {} + } +} diff --git a/src/schemas/json/pyproject.json b/src/schemas/json/pyproject.json index 077a6800b88..1e87428e676 100644 --- a/src/schemas/json/pyproject.json +++ b/src/schemas/json/pyproject.json @@ -124,7 +124,7 @@ "$ref": "https://json.schemastore.org/partial-pdm.json" }, "pyright": { - "$ref": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json" + "$ref": "https://json.schemastore.org/partial-pyright.json" } }, "examples": [ From 96bf90bdfcc94bf388a783eff8020505510113c5 Mon Sep 17 00:00:00 2001 From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 08:29:55 +0000 Subject: [PATCH 3/8] Add as new partial schema per review --- src/api/json/catalog.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index fb4f94ebdb5..598b6264bed 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -3492,6 +3492,12 @@ "name": "Pyright", "description": "Pyright Configuration", "fileMatch": ["pyrightconfig.json"], + "url": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json" + }, + { + "name": "Pyright Partial", + "description": "Pyright Configuration", + "fileMatch": [], "url": "https://json.schemastore.org/partial-pyright.json" }, { From 90118fd2f8e22874deeea46446c99c8abeb32952 Mon Sep 17 00:00:00 2001 From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 11:08:06 +0000 Subject: [PATCH 4/8] Add a comment mentioning the original MIT License --- src/schemas/json/partial-pyright.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/schemas/json/partial-pyright.json b/src/schemas/json/partial-pyright.json index e810f265458..f0647af5d77 100644 --- a/src/schemas/json/partial-pyright.json +++ b/src/schemas/json/partial-pyright.json @@ -1,4 +1,5 @@ { + "$comment": "This file was copied from Pyright's repository, which is licensed under MIT.", "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://json-schema.org/partial-pyright.json", "description": "Pyright Configuration Schema", From 14431f0bfce7fe586133dae2e445253519b6e434 Mon Sep 17 00:00:00 2001 From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 11:11:33 +0000 Subject: [PATCH 5/8] Fix typo --- src/schemas/json/partial-pyright.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/json/partial-pyright.json b/src/schemas/json/partial-pyright.json index f0647af5d77..36342fe2614 100644 --- a/src/schemas/json/partial-pyright.json +++ b/src/schemas/json/partial-pyright.json @@ -1,7 +1,7 @@ { "$comment": "This file was copied from Pyright's repository, which is licensed under MIT.", "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://json-schema.org/partial-pyright.json", + "$id": "https://json.schemastore.org/partial-pyright.json", "description": "Pyright Configuration Schema", "type": "object", "definitions": { From 3e3343d7a231ea196671daa5e308836f780f6ae7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 11:12:13 +0000 Subject: [PATCH 6/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/schemas/json/partial-pyright.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/json/partial-pyright.json b/src/schemas/json/partial-pyright.json index 36342fe2614..607fa450bb4 100644 --- a/src/schemas/json/partial-pyright.json +++ b/src/schemas/json/partial-pyright.json @@ -1,7 +1,7 @@ { - "$comment": "This file was copied from Pyright's repository, which is licensed under MIT.", "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/partial-pyright.json", + "$comment": "This file was copied from Pyright's repository, which is licensed under MIT.", "description": "Pyright Configuration Schema", "type": "object", "definitions": { From 27d3d3eeeda100f8a73c4ffff40063f0f77dedf3 Mon Sep 17 00:00:00 2001 From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 11:15:55 +0000 Subject: [PATCH 7/8] Add pyproject.json to ajvNotStrictMode too --- src/schema-validation.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/schema-validation.json b/src/schema-validation.json index 9f7bb665821..6c2b936f22b 100644 --- a/src/schema-validation.json +++ b/src/schema-validation.json @@ -222,6 +222,7 @@ "lsdlschema.json", "nodemon.json", "partial-pyright.json", + "pyproject.json", "sarif-2.1.0-rtm.0.json", "sarif-2.1.0-rtm.1.json", "sarif-2.1.0-rtm.2.json", From 9b3382e00b3f7878eb5a3edb5cf6592bd2f10c0d Mon Sep 17 00:00:00 2001 From: InSync <122007197+InSyncWithFoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:09:37 +0000 Subject: [PATCH 8/8] Add date to comment --- src/schemas/json/partial-pyright.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/json/partial-pyright.json b/src/schemas/json/partial-pyright.json index 607fa450bb4..08af053abdc 100644 --- a/src/schemas/json/partial-pyright.json +++ b/src/schemas/json/partial-pyright.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/partial-pyright.json", - "$comment": "This file was copied from Pyright's repository, which is licensed under MIT.", + "$comment": "This file was copied from Pyright's repository, which is licensed under MIT, on 2024-01-17.", "description": "Pyright Configuration Schema", "type": "object", "definitions": {