PsiFile (@NotNull String name, @NotNull String text) { LightVirtualFile originalFile = new LightVirtualFile(name, myLanguage, text); LightVirtualFile virtualFile = new LightVirtualFile(name, myLanguage, text); virtualFile.setOriginalFile(originalFile); originalFile.setCharset(StandardCharsets.UTF_8); PythonLanguageLevelPusher.specifyFileLanguageLevel(originalFile, myLanguageLevel); PyConsoleUtil.markIPython(originalFile); return createFile(virtualFile); }