mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 16:06:39 +03:00
Fixed false positive "metaclass conflict" error that occurs when the metaclass has an unknown class type in its class hierarchy.
This commit is contained in:
parent
f228068e3b
commit
d641c9230e
@ -11444,11 +11444,11 @@ export function createTypeEvaluator(
|
||||
if (!effectiveMetaclass) {
|
||||
effectiveMetaclass = baseClassMeta;
|
||||
} else if (
|
||||
derivesFromClassRecursive(baseClassMeta, effectiveMetaclass, /* ignoreUnknown */ true)
|
||||
derivesFromClassRecursive(baseClassMeta, effectiveMetaclass, /* ignoreUnknown */ false)
|
||||
) {
|
||||
effectiveMetaclass = baseClassMeta;
|
||||
} else if (
|
||||
!derivesFromClassRecursive(effectiveMetaclass, baseClassMeta, /* ignoreUnknown */ true)
|
||||
!derivesFromClassRecursive(effectiveMetaclass, baseClassMeta, /* ignoreUnknown */ false)
|
||||
) {
|
||||
if (!reportedMetaclassConflict) {
|
||||
addDiagnostic(
|
||||
|
Loading…
Reference in New Issue
Block a user