Skip to content

Commit

Permalink
chore(deps): bump pyright from 1.1.347 to 1.1.348 in /language-server (
Browse files Browse the repository at this point in the history
…#300)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rafał Chłodnicki <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2024
1 parent 3d4b1db commit 5e84d17
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 22 deletions.
2 changes: 0 additions & 2 deletions LSP-pyright.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
"python.analysis.diagnosticSeverityOverrides": {
"reportDuplicateImport": "warning",
"reportImplicitStringConcatenation": "warning",
"reportMissingParameterType": "none",
"reportUnboundVariable": "warning",
"reportUninitializedInstanceVariable": "none",
"reportUnusedClass": "information",
"reportUnusedFunction": "information",
"reportUnusedImport": "information",
Expand Down
14 changes: 7 additions & 7 deletions language-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion language-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"pyright": "^1.1.347"
"pyright": "^1.1.348"
}
}
22 changes: 10 additions & 12 deletions scripts/update_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

import json
from collections.abc import Generator
from pathlib import Path
from typing import Any
from urllib.request import urlopen
Expand Down Expand Up @@ -56,7 +55,7 @@ def read_sublime_package_json() -> tuple[JsonDict, JsonDict]:
return (pyrightconfig_schema_json, sublime_package_schema_json)


def update_schema(sublime_package_json: JsonDict, pyrightconfig_schema_json: JsonDict) -> Generator[str, None, None]:
def update_schema(sublime_package_json: JsonDict, pyrightconfig_schema_json: JsonDict) -> list[str]:
pyrightconfig_contribution: JsonDict | None = None
lsp_pyright_contribution: JsonDict | None = None
for contribution in sublime_package_json["contributions"]["settings"]:
Expand Down Expand Up @@ -92,16 +91,15 @@ def update_schema(sublime_package_json: JsonDict, pyrightconfig_schema_json: Jso
# then it might have to be added manually.
all_settings_keys = [key.rpartition(".")[2] for key in settings_properties.keys()]
all_overrides_keys = settings_properties["python.analysis.diagnosticSeverityOverrides"]["properties"].keys()

yield from (
pyrightconfig_key
for pyrightconfig_key in pyrightconfig_properties.keys()
if not (
pyrightconfig_key in all_settings_keys
or pyrightconfig_key in all_overrides_keys
or pyrightconfig_key in IGNORED_PYRIGHTCONFIG_KEYS
)
)
new_schema_keys = []
for pyrightconfig_key in pyrightconfig_properties.keys():
if (
pyrightconfig_key not in all_settings_keys
and pyrightconfig_key not in all_overrides_keys
and pyrightconfig_key not in IGNORED_PYRIGHTCONFIG_KEYS
):
new_schema_keys.append(pyrightconfig_key)
return new_schema_keys


def update_property_ref(property_key: str, property_schema: JsonDict, pyrightconfig_properties: JsonDict) -> None:
Expand Down
48 changes: 48 additions & 0 deletions sublime-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,30 @@
"enableTypeIgnoreComments": {
"$ref": "sublime://pyrightconfig#/properties/enableTypeIgnoreComments"
},
"reportAbstractUsage": {
"$ref": "sublime://pyrightconfig#/properties/reportAbstractUsage"
},
"reportArgumentType": {
"$ref": "sublime://pyrightconfig#/properties/reportArgumentType"
},
"reportAssertAlwaysTrue": {
"$ref": "sublime://pyrightconfig#/properties/reportAssertAlwaysTrue"
},
"reportAssertTypeFailure": {
"$ref": "sublime://pyrightconfig#/properties/reportAssertTypeFailure"
},
"reportAssignmentType": {
"$ref": "sublime://pyrightconfig#/properties/reportAssignmentType"
},
"reportAttributeAccessIssue": {
"$ref": "sublime://pyrightconfig#/properties/reportAttributeAccessIssue"
},
"reportCallInDefaultInitializer": {
"$ref": "sublime://pyrightconfig#/properties/reportCallInDefaultInitializer"
},
"reportCallIssue": {
"$ref": "sublime://pyrightconfig#/properties/reportCallIssue"
},
"reportConstantRedefinition": {
"$ref": "sublime://pyrightconfig#/properties/reportConstantRedefinition"
},
Expand Down Expand Up @@ -129,12 +147,24 @@
"reportInconsistentConstructor": {
"$ref": "sublime://pyrightconfig#/properties/reportInconsistentConstructor"
},
"reportInconsistentOverload": {
"$ref": "sublime://pyrightconfig#/properties/reportInconsistentOverload"
},
"reportIndexIssue": {
"$ref": "sublime://pyrightconfig#/properties/reportIndexIssue"
},
"reportInvalidStringEscapeSequence": {
"$ref": "sublime://pyrightconfig#/properties/reportInvalidStringEscapeSequence"
},
"reportInvalidStubStatement": {
"$ref": "sublime://pyrightconfig#/properties/reportInvalidStubStatement"
},
"reportInvalidTypeArguments": {
"$ref": "sublime://pyrightconfig#/properties/reportInvalidTypeArguments"
},
"reportInvalidTypeForm": {
"$ref": "sublime://pyrightconfig#/properties/reportInvalidTypeForm"
},
"reportInvalidTypeVarUse": {
"$ref": "sublime://pyrightconfig#/properties/reportInvalidTypeVarUse"
},
Expand All @@ -159,6 +189,12 @@
"reportMissingTypeStubs": {
"$ref": "sublime://pyrightconfig#/properties/reportMissingTypeStubs"
},
"reportNoOverloadImplementation": {
"$ref": "sublime://pyrightconfig#/properties/reportNoOverloadImplementation"
},
"reportOperatorIssue": {
"$ref": "sublime://pyrightconfig#/properties/reportOperatorIssue"
},
"reportOptionalCall": {
"$ref": "sublime://pyrightconfig#/properties/reportOptionalCall"
},
Expand All @@ -180,6 +216,9 @@
"reportOverlappingOverload": {
"$ref": "sublime://pyrightconfig#/properties/reportOverlappingOverload"
},
"reportPossiblyUnboundVariable": {
"$ref": "sublime://pyrightconfig#/properties/reportPossiblyUnboundVariable"
},
"reportPrivateImportUsage": {
"$ref": "sublime://pyrightconfig#/properties/reportPrivateImportUsage"
},
Expand All @@ -189,6 +228,12 @@
"reportPropertyTypeMismatch": {
"$ref": "sublime://pyrightconfig#/properties/reportPropertyTypeMismatch"
},
"reportRedeclaration": {
"$ref": "sublime://pyrightconfig#/properties/reportRedeclaration"
},
"reportReturnType": {
"$ref": "sublime://pyrightconfig#/properties/reportReturnType"
},
"reportSelfClsParameterName": {
"$ref": "sublime://pyrightconfig#/properties/reportSelfClsParameterName"
},
Expand Down Expand Up @@ -264,6 +309,9 @@
"reportUnusedCoroutine": {
"$ref": "sublime://pyrightconfig#/properties/reportUnusedCoroutine"
},
"reportUnusedExcept": {
"$ref": "sublime://pyrightconfig#/properties/reportUnusedExcept"
},
"reportUnusedExpression": {
"$ref": "sublime://pyrightconfig#/properties/reportUnusedExpression"
},
Expand Down

0 comments on commit 5e84d17

Please sign in to comment.