Changed error messages to refer to lowercase list, dict and type rather than their deprecated uppercase counterparts now that Python 3.8 is EOL'ed. This addresses https://github.com/microsoft/pylance-release/issues/6783.

This commit is contained in:
Eric Traut 2024-12-18 01:53:40 -08:00
parent c9af81d96d
commit 1f5a2bcdd8

View file

@ -2064,20 +2064,20 @@
"uninitializedAbstractVariable": "Instance variable \"{name}\" is defined in abstract base class \"{classType}\" but not initialized",
"unreachableExcept": "\"{exceptionType}\" is a subclass of \"{parentType}\"",
"useDictInstead": {
"message": "Use Dict[T1, T2] to indicate a dictionary type",
"comment": "{Locked='Dict[T1, T2]'}"
"message": "Use dict[T1, T2] to indicate a dictionary type",
"comment": "{Locked='dict[T1, T2]'}"
},
"useListInstead": {
"message": "Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type",
"comment": "{Locked='List[T]','list','Union[T1, T2]','union'}"
"message": "Use list[T] to indicate a list type or T1 | T2 to indicate a union type",
"comment": "{Locked='list[T]','list','T1 | T2','union'}"
},
"useTupleInstead": {
"message": "Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type",
"comment": "{Locked='tuple[T1, ..., Tn]','tuple','Union[T1, T2]','union'}"
"message": "Use tuple[T1, ..., Tn] to indicate a tuple type or T1 | T2 to indicate a union type",
"comment": "{Locked='tuple[T1, ..., Tn]','tuple','T1 | T2','union'}"
},
"useTypeInstead": {
"message": "Use Type[T] instead",
"comment": "{Locked='Type[T]'}"
"message": "Use type[T] instead",
"comment": "{Locked='type[T]'}"
},
"varianceMismatchForClass": "Variance of type argument \"{typeVarName}\" is incompatible with base class \"{className}\"",
"varianceMismatchForTypeAlias": "Variance of type argument \"{typeVarName}\" is incompatible with \"{typeAliasParam}\""