mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move static method closer to its usage
This commit is contained in:
@@ -225,7 +225,7 @@ public class PyClassTypeImpl extends UserDataHolderBase implements PyClassType {
|
||||
if (isDefinition()) {
|
||||
return true;
|
||||
}
|
||||
if (PyTypeChecker.isMethodType(this)) {
|
||||
if (isMethodType(this)) {
|
||||
return true;
|
||||
}
|
||||
final PyClass cls = getPyClass();
|
||||
@@ -235,6 +235,11 @@ public class PyClassTypeImpl extends UserDataHolderBase implements PyClassType {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isMethodType(@NotNull PyClassType type) {
|
||||
final PyBuiltinCache builtinCache = PyBuiltinCache.getInstance(type.getPyClass());
|
||||
return type.equals(builtinCache.getClassMethodType()) || type.equals(builtinCache.getStaticMethodType());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public PyType getCallType(@NotNull TypeEvalContext context, @Nullable PyQualifiedExpression callSite) {
|
||||
|
||||
@@ -446,11 +446,6 @@ public class PyTypeChecker {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isMethodType(@NotNull PyClassType type) {
|
||||
final PyBuiltinCache builtinCache = PyBuiltinCache.getInstance(type.getPyClass());
|
||||
return type.equals(builtinCache.getClassMethodType()) || type.equals(builtinCache.getStaticMethodType());
|
||||
}
|
||||
|
||||
/**
|
||||
* Hack for skipping type checking for method calls of union members if there are several call alternatives.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user