void () { //RecursionManager.assertOnRecursionPrevention(getTestRootDisposable()); StringBuilder text = new StringBuilder(""" from __future__ import annotations from typing import TypedDict, Union """); int typedDictCount = 30; for (int i = 1; i <= typedDictCount; i++) { text.append(String.format(""" class D%d(TypedDict): key%d: Alias """, i, i)); } text.append("Alias = Union["); for (int i = 1; i <= typedDictCount; i++) { text.append("D").append(i).append(", "); } text.append("]\n"); text.append("expr: D1\n"); myFixture.configureByText(PythonFileType.INSTANCE, text.toString()); PyExpression expr = myFixture.findElementByText("expr", PyExpression.class); TypeEvalContext codeAnalysis = TypeEvalContext.codeAnalysis(expr.getProject(), expr.getContainingFile()); PyType type = codeAnalysis.getType(expr); assertInstanceOf(type, PyTypedDictType.class); assertTrue(countTypes(type) < 100); }