mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
Pattern variable can be used mass cleanup
GitOrigin-RevId: 55839bf0deca5f81d0f7eb5b1c190145a5ea0037
This commit is contained in:
committed by
intellij-monorepo-bot
parent
daaa8e8930
commit
f456ed0604
@@ -225,9 +225,7 @@ public class PyJavaClassType implements PyClassLikeType {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof PyJavaClassType)) return false;
|
||||
|
||||
PyJavaClassType type = (PyJavaClassType)o;
|
||||
if (!(o instanceof PyJavaClassType type)) return false;
|
||||
|
||||
if (myDefinition != type.myDefinition) return false;
|
||||
if (myClass != null ? !myClass.equals(type.myClass) : type.myClass != null) return false;
|
||||
|
||||
@@ -42,8 +42,7 @@ public class PyJavaTypeProvider extends PyTypeProviderBase {
|
||||
|
||||
@Nullable
|
||||
public static PyType asPyType(@Nullable PsiType type) {
|
||||
if (type instanceof PsiClassType) {
|
||||
final PsiClassType classType = (PsiClassType)type;
|
||||
if (type instanceof PsiClassType classType) {
|
||||
final PsiClass psiClass = classType.resolve();
|
||||
if (psiClass != null) {
|
||||
return new PyJavaClassType(psiClass, false);
|
||||
@@ -62,8 +61,7 @@ public class PyJavaTypeProvider extends PyTypeProviderBase {
|
||||
if (index < 0) return null;
|
||||
final List<PyType> superMethodParameterTypes = new ArrayList<>();
|
||||
PySuperMethodsSearch.search(func, context).forEach(psiElement -> {
|
||||
if (psiElement instanceof PsiMethod) {
|
||||
final PsiMethod method = (PsiMethod)psiElement;
|
||||
if (psiElement instanceof PsiMethod method) {
|
||||
final PsiParameter[] psiParameters = method.getParameterList().getParameters();
|
||||
int javaIndex = method.hasModifierProperty(PsiModifier.STATIC) ? index : index-1; // adjust for 'self' parameter
|
||||
if (javaIndex < psiParameters.length) {
|
||||
|
||||
Reference in New Issue
Block a user