Skip to content

Commit 3280f6b

Browse files
committed
Replace List with Sequence in cattrs hooks
1 parent 91510f1 commit 3280f6b

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

packages/python/lsprotocol/_hooks.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33
import sys
4-
from typing import Any, List, Optional, Tuple, Union
4+
from typing import Any, List, Optional, Sequence, Tuple, Union
55

66
import attrs
77
import cattrs
@@ -888,7 +888,7 @@ def _notebook_sync_registration_option_selector_hook(
888888
_inlay_hint_provider_hook,
889889
),
890890
(
891-
Union[str, List[lsp_types.InlayHintLabelPart]],
891+
Union[str, Sequence[lsp_types.InlayHintLabelPart]],
892892
_inlay_hint_label_part_hook,
893893
),
894894
(
@@ -908,22 +908,22 @@ def _notebook_sync_registration_option_selector_hook(
908908
_code_action_hook,
909909
),
910910
(
911-
Optional[Union[List[lsp_types.CompletionItem], lsp_types.CompletionList]],
911+
Optional[Union[Sequence[lsp_types.CompletionItem], lsp_types.CompletionList]],
912912
_completion_list_hook,
913913
),
914914
(
915915
Optional[
916916
Union[
917917
lsp_types.Location,
918-
List[lsp_types.Location],
919-
List[lsp_types.LocationLink],
918+
Sequence[lsp_types.Location],
919+
Sequence[lsp_types.LocationLink],
920920
]
921921
],
922922
_location_hook,
923923
),
924924
(
925925
Optional[
926-
Union[List[lsp_types.SymbolInformation], List[lsp_types.DocumentSymbol]]
926+
Union[Sequence[lsp_types.SymbolInformation], Sequence[lsp_types.DocumentSymbol]]
927927
],
928928
_symbol_hook,
929929
),
@@ -932,7 +932,7 @@ def _notebook_sync_registration_option_selector_hook(
932932
lsp_types.MarkupContent,
933933
str,
934934
lsp_types.MarkedString_Type1,
935-
List[Union[str, lsp_types.MarkedString_Type1]],
935+
Sequence[Union[str, lsp_types.MarkedString_Type1]],
936936
],
937937
_markup_content_hook,
938938
),
@@ -1033,7 +1033,7 @@ def _notebook_sync_registration_option_selector_hook(
10331033
(
10341034
Optional[
10351035
Union[
1036-
lsp_types.InlineCompletionList, List[lsp_types.InlineCompletionItem]
1036+
lsp_types.InlineCompletionList, Sequence[lsp_types.InlineCompletionItem]
10371037
]
10381038
],
10391039
_inline_completion_list_hook,
@@ -1045,7 +1045,7 @@ def _notebook_sync_registration_option_selector_hook(
10451045
(
10461046
Optional[
10471047
Union[
1048-
List[lsp_types.SymbolInformation], List[lsp_types.WorkspaceSymbol]
1048+
Sequence[lsp_types.SymbolInformation], Sequence[lsp_types.WorkspaceSymbol]
10491049
]
10501050
],
10511051
_symbol_list_hook,
@@ -1148,12 +1148,12 @@ def _notebook_filter_hook(
11481148
),
11491149
(NotebookSelectorItem, _notebook_filter_hook),
11501150
(
1151-
Union[lsp_types.LSPObject, List["LSPAny"], str, int, float, bool, None],
1151+
Union[lsp_types.LSPObject, Sequence["LSPAny"], str, int, float, bool, None],
11521152
_lsp_object_hook,
11531153
),
11541154
(
11551155
Union[
1156-
lsp_types.LSPObject, List[lsp_types.LSPAny], str, int, float, bool, None
1156+
lsp_types.LSPObject, Sequence[lsp_types.LSPAny], str, int, float, bool, None
11571157
],
11581158
_lsp_object_hook,
11591159
),
@@ -1169,10 +1169,10 @@ def _notebook_filter_hook(
11691169
(
11701170
Union[
11711171
lsp_types.LSPObject,
1172-
List[
1172+
Sequence[
11731173
Union[
11741174
lsp_types.LSPObject,
1175-
List["LSPAny"],
1175+
Sequence["LSPAny"],
11761176
str,
11771177
int,
11781178
float,

0 commit comments

Comments
 (0)