boolean (@NotNull PyElement stmt, @NotNull String suppressId) { PsiElement prevSibling = stmt.getPrevSibling(); if (prevSibling == null) { final PsiElement parent = stmt.getParent(); if (parent != null) { prevSibling = parent.getPrevSibling(); } } while (prevSibling instanceof PsiComment || prevSibling instanceof PsiWhiteSpace) { if (prevSibling instanceof PsiComment && isSuppressedInComment(prevSibling.getText().substring(1).trim(), suppressId)) { return true; } prevSibling = prevSibling.getPrevSibling(); } return false; }