99
1010import enum
1111import functools
12- from typing import Any , Dict , Literal , Optional , Sequence , Tuple , Union
12+ from typing import Any , Mapping , Literal , Optional , Sequence , Tuple , Union
1313import attrs
1414from . import validators
1515
@@ -1957,7 +1957,7 @@ class WorkspaceEdit:
19571957 cause failure of the operation. How the client recovers from the failure is described by
19581958 the client capability: `workspace.workspaceEdit.failureHandling`"""
19591959
1960- changes : Optional [Dict [str , Sequence ["TextEdit" ]]] = attrs .field (default = None )
1960+ changes : Optional [Mapping [str , Sequence ["TextEdit" ]]] = attrs .field (default = None )
19611961 """Holds changes to existing resources."""
19621962
19631963 document_changes : Optional [
@@ -1975,7 +1975,7 @@ class WorkspaceEdit:
19751975 only plain `TextEdit`s using the `changes` property are supported."""
19761976
19771977 change_annotations : Optional [
1978- Dict [ChangeAnnotationIdentifier , "ChangeAnnotation" ]
1978+ Mapping [ChangeAnnotationIdentifier , "ChangeAnnotation" ]
19791979 ] = attrs .field (default = None )
19801980 """A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and
19811981 delete file / folder operations.
@@ -2454,7 +2454,7 @@ class DocumentDiagnosticReportPartialResult:
24542454
24552455 # Since: 3.17.0
24562456
2457- related_documents : Dict [
2457+ related_documents : Mapping [
24582458 str , Union ["FullDocumentDiagnosticReport" , "UnchangedDocumentDiagnosticReport" ]
24592459 ] = attrs .field ()
24602460
@@ -5644,7 +5644,7 @@ class RelatedFullDocumentDiagnosticReport:
56445644 """The actual items."""
56455645
56465646 related_documents : Optional [
5647- Dict [
5647+ Mapping [
56485648 str ,
56495649 Union [FullDocumentDiagnosticReport , "UnchangedDocumentDiagnosticReport" ],
56505650 ]
@@ -5705,7 +5705,7 @@ class RelatedUnchangedDocumentDiagnosticReport:
57055705 diagnostic request for the same document."""
57065706
57075707 related_documents : Optional [
5708- Dict [
5708+ Mapping [
57095709 str , Union [FullDocumentDiagnosticReport , UnchangedDocumentDiagnosticReport ]
57105710 ]
57115711 ] = attrs .field (default = None )
@@ -13236,7 +13236,7 @@ def is_special_property(cls: type, property_name: str) -> bool:
1323613236 return qualified_name in _SPECIAL_PROPERTIES
1323713237
1323813238
13239- ALL_TYPES_MAP : Dict [str , Union [type , object ]] = {
13239+ ALL_TYPES_MAP : Mapping [str , Union [type , object ]] = {
1324013240 "AnnotatedTextEdit" : AnnotatedTextEdit ,
1324113241 "ApplyKind" : ApplyKind ,
1324213242 "ApplyWorkspaceEditParams" : ApplyWorkspaceEditParams ,
@@ -13901,7 +13901,7 @@ def is_special_property(cls: type, property_name: str) -> bool:
1390113901 "_InitializeParams" : _InitializeParams ,
1390213902}
1390313903
13904- _MESSAGE_DIRECTION : Dict [str , str ] = {
13904+ _MESSAGE_DIRECTION : Mapping [str , str ] = {
1390513905 # Request methods
1390613906 CALL_HIERARCHY_INCOMING_CALLS : "clientToServer" ,
1390713907 CALL_HIERARCHY_OUTGOING_CALLS : "clientToServer" ,
0 commit comments