Pattern variable can be used mass cleanup

GitOrigin-RevId: 55839bf0deca5f81d0f7eb5b1c190145a5ea0037
This commit is contained in:
Tagir Valeev
2023-02-07 13:24:01 +01:00
committed by intellij-monorepo-bot
parent daaa8e8930
commit f456ed0604
2270 changed files with 4362 additions and 8927 deletions

View File

@@ -215,8 +215,7 @@ public final class NameResolverTools {
@Override
public boolean value(final PsiElement element) {
if (element instanceof PyCallExpression) {
PyCallExpression callExpression = (PyCallExpression)element;
if (element instanceof PyCallExpression callExpression) {
return isCalleeShortCut(callExpression, myNameToSearch);
}
return false;

View File

@@ -113,8 +113,7 @@ public interface PyCallExpression extends PyCallSiteExpression {
@Nullable
default PyExpression getKeywordArgument(@NotNull String keyword) {
for (PyExpression arg : getArguments()) {
if (arg instanceof PyKeywordArgument) {
final PyKeywordArgument keywordArg = (PyKeywordArgument)arg;
if (arg instanceof PyKeywordArgument keywordArg) {
if (keyword.equals(keywordArg.getKeyword())) {
return keywordArg.getValueExpression();
}

View File

@@ -49,9 +49,7 @@ class TypeEvalConstraints {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof TypeEvalConstraints)) return false;
TypeEvalConstraints that = (TypeEvalConstraints)o;
if (!(o instanceof TypeEvalConstraints that)) return false;
return myAllowDataFlow == that.myAllowDataFlow &&
myAllowStubToAST == that.myAllowStubToAST &&