diff --git a/packages/pyright-internal/src/analyzer/packageTypeVerifier.ts b/packages/pyright-internal/src/analyzer/packageTypeVerifier.ts index d0fc6a5a2f08..03fd63df7d34 100644 --- a/packages/pyright-internal/src/analyzer/packageTypeVerifier.ts +++ b/packages/pyright-internal/src/analyzer/packageTypeVerifier.ts @@ -1204,7 +1204,8 @@ export class PackageTypeVerifier { if (metaclassKnownStatus !== TypeKnownStatus.Known) { this._addSymbolError( symbolInfo, - `Type of metaclass "${type.shared.effectiveMetaclass}" is partially unknown` + diag.getString(), + `Type of metaclass "${type.shared.effectiveMetaclass.shared.name}" is partially unknown` + + diag.getString(), getEmptyRange(), Uri.empty() );