PY-76885 Conformance test failure: constructors_call_metaclass.py

Added multi-file test.

GitOrigin-RevId: e3105c8036c90b9571143ce7b2cc970813a5ed3b
This commit is contained in:
Petr
2025-04-23 19:39:34 +00:00
committed by intellij-monorepo-bot
parent ddf63b888a
commit cb2b4ae26f
3 changed files with 17 additions and 0 deletions
@@ -0,0 +1,9 @@
from typing import Self
from m import Meta
class MyClass(metaclass=Meta):
def __new__(cls, p) -> Self: ...
expr = MyClass()
@@ -0,0 +1,4 @@
class Meta(type):
def call(cls, *args, **kwargs) -> object: ...
__call__ = call
@@ -421,6 +421,10 @@ public class Py3ArgumentListInspectionTest extends PyInspectionTestCase {
""");
}
public void testMetaclassDunderCallReturnTypeIncompatibleWithClassBeingConstructedMultiFile() {
doMultiFileTest();
}
public void testMetaclassNotAnnotatedDunderCall() {
doTestByText("""
from typing import Self