chore(lsprotocol): migrate to 2025.0.0 and cleanup artifacts

The changes align the project with the 2025.0.0 lsprotocol
release, removing the old backport and updating type hints
in the protocol hooks to use Sequence where appropriate. The
dist-info and packaging metadata for older lsprotocol
versions are replaced with the new 2025.0.0 artifacts.

- Remove exceptiongroup backport used on Python <3.11
- Use Sequence instead of List in LS protocol hooks
- Replace old dist-info with 2025.0.0 metadata
This commit is contained in:
Christoph Brandau
2026-09-03 08:39:12 +02:00
parent a0a0d38fe5
commit 53ebc5d055
101 changed files with 13838 additions and 7624 deletions
+11 -7
View File
@@ -2,6 +2,15 @@ from collections.abc import Callable
from voluptuous import Optional, Or, Schema, Self
_switch_value = Or({"type": "any"}, {"type": "int"}, None)
_positional_value = Or(
{"type": "any"},
{"type": "int"},
{"type": "variadic"},
{"type": "script"},
{"type": "expression"},
)
# Need to define this as a Schema with required=True to ensure that this requirement
# persists through the Or in the main schema definition.
_command_args = Schema(
@@ -10,19 +19,14 @@ _command_args = Schema(
{
"name": str,
"required": bool,
"value": Or(
{"type": "any"},
{"type": "variadic"},
{"type": "script"},
{"type": "expression"},
),
"value": _positional_value,
}
],
Optional("switches", default={}): {
Optional(str): {
"required": bool,
"repeated": bool,
"value": Or({"type": "any"}, None),
"value": _switch_value,
Optional("metavar"): str,
}
},