Removed some vestigial code related to inlined TypedDicts.

This commit is contained in:
Eric Traut 2024-06-18 23:17:37 +02:00
parent e54e2f4399
commit 918bc4c745
2 changed files with 1 additions and 19 deletions

View File

@ -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(

View File

@ -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;