mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
More diagnostic message improvements: switched from "cannot assign to type" to "incompatible with type" for consistency and clarity.
This commit is contained in:
parent
27e6b0e054
commit
c212c2374f
@ -404,7 +404,7 @@
|
||||
"returnOutsideFunction": "\"return\" can be used only within a function",
|
||||
"returnMissing": "Function with declared return type \"{returnType}\" must return value on all code paths",
|
||||
"returnTypeContravariant": "Contravariant type variable cannot be used in return type",
|
||||
"returnTypeMismatch": "Expression of type \"{exprType}\" cannot be assigned to return type \"{returnType}\"",
|
||||
"returnTypeMismatch": "Expression of type \"{exprType}\" is incompatible with return type \"{returnType}\"",
|
||||
"returnTypeUnknown": "Return type is unknown",
|
||||
"returnTypePartiallyUnknown": "Return type, \"{returnType}\", is partially unknown",
|
||||
"revealLocalsArgs": "Expected no arguments for \"reveal_locals\" call",
|
||||
@ -470,8 +470,8 @@
|
||||
"typeArgsMissingForClass": "Expected type arguments for generic class \"{name}\"",
|
||||
"typeArgsTooFew": "Too few type arguments provided for \"{name}\"; expected {expected} but received {received}",
|
||||
"typeArgsTooMany": "Too many type arguments provided for \"{name}\"; expected {expected} but received {received}",
|
||||
"typeAssignmentMismatch": "Expression of type \"{sourceType}\" cannot be assigned to declared type \"{destType}\"",
|
||||
"typeAssignmentMismatchWildcard": "Import symbol \"{name}\" has type \"{sourceType}\", which cannot be assigned to declared type \"{destType}\"",
|
||||
"typeAssignmentMismatch": "Expression of type \"{sourceType}\" is incompatible with declared type \"{destType}\"",
|
||||
"typeAssignmentMismatchWildcard": "Import symbol \"{name}\" has type \"{sourceType}\", which is incompatible with declared type \"{destType}\"",
|
||||
"typeCallNotAllowed": "type() call should not be used in type annotation",
|
||||
"typeCheckOnly": "\"{name}\" is marked as @type_check_only and can be used only in type annotations",
|
||||
"typeCommentDeprecated": "Use of type comments is deprecated; use type annotation instead",
|
||||
@ -620,7 +620,7 @@
|
||||
"argsPositionOnly": "Position-only parameter mismatch; expected {expected} but received {received}",
|
||||
"argumentType": "Argument type is \"{type}\"",
|
||||
"argumentTypes": "Argument types: ({types})",
|
||||
"assignToNone": "Type cannot be assigned to type \"None\"",
|
||||
"assignToNone": "Type is incompatible with \"None\"",
|
||||
"asyncHelp": "Did you mean \"async with\"?",
|
||||
"baseClassIncompatible": "Base class \"{baseClass}\" is incompatible with type \"{type}\"",
|
||||
"baseClassIncompatibleSubclass": "Base class \"{baseClass}\" derives from \"{subclass}\" which is incompatible with type \"{type}\"",
|
||||
@ -656,7 +656,7 @@
|
||||
"invariantSuggestionSet": "Consider switching from \"set\" to \"Container\" which is covariant",
|
||||
"kwargsParamMissing": "Parameter \"**{paramName}\" has no corresponding parameter",
|
||||
"listAssignmentMismatch": "Type \"{type}\" is incompatible with target list",
|
||||
"literalAssignmentMismatch": "\"{sourceType}\" cannot be assigned to type \"{destType}\"",
|
||||
"literalAssignmentMismatch": "\"{sourceType}\" is incompatible with type \"{destType}\"",
|
||||
"matchIsNotExhaustiveType": "Unhandled type: \"{type}\"",
|
||||
"matchIsNotExhaustiveHint": "If exhaustive handling is not intended, add \"case _: pass\"",
|
||||
"memberSetClassVar": "Attribute \"{name}\" cannot be assigned through a class instance because it is a ClassVar",
|
||||
@ -679,7 +679,7 @@
|
||||
"missingDeleter": "Property deleter method is missing",
|
||||
"namedParamMissingInDest": "Keyword parameter \"{name}\" is missing in destination",
|
||||
"namedParamMissingInSource": "Keyword parameter \"{name}\" is missing in source",
|
||||
"namedParamTypeMismatch": "Keyword parameter \"{name}\" of type \"{sourceType}\" cannot be assigned to type \"{destType}\"",
|
||||
"namedParamTypeMismatch": "Keyword parameter \"{name}\" of type \"{sourceType}\" is incompatible with type \"{destType}\"",
|
||||
"namedTupleNotAllowed": "NamedTuple cannot be used for instance or class checks",
|
||||
"newMethodLocation": "The __new__ method is defined in class \"{type}\"",
|
||||
"newMethodSignature": "Signature of __new__ is \"{type}\"",
|
||||
@ -711,7 +711,7 @@
|
||||
"overridePositionalParamCount": "Positional parameter count mismatch; base method has {baseCount}, but override has {overrideCount}",
|
||||
"overrideReturnType": "Return type mismatch: base method returns type \"{baseType}\", override returns type \"{overrideType}\"",
|
||||
"overrideType": "Base class defines type as \"{type}\"",
|
||||
"paramAssignment": "Parameter {index}: type \"{sourceType}\" cannot be assigned to type \"{destType}\"",
|
||||
"paramAssignment": "Parameter {index}: type \"{sourceType}\" is incompatible with type \"{destType}\"",
|
||||
"paramSpecMissingInOverride": "ParamSpec parameters are missing in override method",
|
||||
"paramType": "Parameter type is \"{paramType}\"",
|
||||
"privateImportFromPyTypedSource": "Import from \"{module}\" instead",
|
||||
@ -741,7 +741,7 @@
|
||||
"tupleSizeMismatch": "Tuple size mismatch; expected {expected} but received {received}",
|
||||
"tupleSizeMismatchIndeterminateDest": "Tuple size mismatch; expected {expected} or more but received {received}",
|
||||
"typeAliasInstanceCheck": "Type alias created with \"type\" statement cannot be used with instance and class checks",
|
||||
"typeAssignmentMismatch": "Type \"{sourceType}\" cannot be assigned to type \"{destType}\"",
|
||||
"typeAssignmentMismatch": "Type \"{sourceType}\" is incompatible with type \"{destType}\"",
|
||||
"typeBound": "Type \"{sourceType}\" is incompatible with bound type \"{destType}\" for type variable \"{name}\"",
|
||||
"typeConstrainedTypeVar": "Type \"{type}\" is incompatible with constrained type variable \"{name}\"",
|
||||
"typedDictBaseClass": "Class \"{type}\" is not a TypedDict",
|
||||
|
Loading…
Reference in New Issue
Block a user