PyType (@Nullable PsiType type) { if (type instanceof PsiClassType classType) { final PsiClass psiClass = classType.resolve(); if (psiClass != null) { return new PyJavaClassType(psiClass, false); } } return null; }