mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Removed some vestigial code related to inlined TypedDicts.
This commit is contained in:
parent
e54e2f4399
commit
918bc4c745
@ -20224,22 +20224,7 @@ export function createTypeEvaluator(
|
||||
minTypeArgCount = firstDefaultParamIndex;
|
||||
}
|
||||
|
||||
// Classes that accept inlined type dict type args allow only one.
|
||||
if (typeArgs[0].inlinedTypeDict) {
|
||||
if (typeArgs.length > 1) {
|
||||
addDiagnostic(
|
||||
DiagnosticRule.reportInvalidTypeArguments,
|
||||
LocMessage.typeArgsTooMany().format({
|
||||
name: classType.aliasName || classType.details.name,
|
||||
expected: 1,
|
||||
received: typeArgCount,
|
||||
}),
|
||||
typeArgs[1].node
|
||||
);
|
||||
}
|
||||
|
||||
return { type: typeArgs[0].inlinedTypeDict };
|
||||
} else if (typeArgCount > typeParameters.length) {
|
||||
if (typeArgCount > typeParameters.length) {
|
||||
if (!ClassType.isPartiallyEvaluated(classType) && !ClassType.isTupleClass(classType)) {
|
||||
if (typeParameters.length === 0) {
|
||||
addDiagnostic(
|
||||
|
@ -184,9 +184,6 @@ export interface TypeResult<T extends Type = Type> {
|
||||
unpackedType?: Type | undefined;
|
||||
typeList?: TypeResultWithNode[] | undefined;
|
||||
|
||||
// For inlined TypedDict definitions.
|
||||
inlinedTypeDict?: ClassType;
|
||||
|
||||
// Type consistency errors detected when evaluating this type.
|
||||
typeErrors?: boolean | undefined;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user