mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[python] rename __get__ in PyNames.java from GET to DUNDER_GET to avoid confusion
(cherry picked from commit 23dd9bc6cb72630e3bee02a2fb160ff38be17d9a) GitOrigin-RevId: 94e20ece2828c01019c20ae02663e9bad89a8ff7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c653a43cab
commit
7d891602cf
@@ -72,7 +72,7 @@ public final @NonNls class PyNames {
|
|||||||
public static final String NEW = "__new__";
|
public static final String NEW = "__new__";
|
||||||
public static final String GETATTR = "__getattr__";
|
public static final String GETATTR = "__getattr__";
|
||||||
public static final String GETATTRIBUTE = "__getattribute__";
|
public static final String GETATTRIBUTE = "__getattribute__";
|
||||||
public static final String GET = "__get__";
|
public static final String DUNDER_GET = "__get__";
|
||||||
public static final String DUNDER_SET = "__set__";
|
public static final String DUNDER_SET = "__set__";
|
||||||
public static final String __CLASS__ = "__class__";
|
public static final String __CLASS__ = "__class__";
|
||||||
public static final String DUNDER_METACLASS = "__metaclass__";
|
public static final String DUNDER_METACLASS = "__metaclass__";
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public final class PyDescriptorTypeUtil {
|
|||||||
if (targetType == null || targetType.isDefinition()) return null;
|
if (targetType == null || targetType.isDefinition()) return null;
|
||||||
|
|
||||||
final PyResolveContext resolveContext = PyResolveContext.noProperties(context);
|
final PyResolveContext resolveContext = PyResolveContext.noProperties(context);
|
||||||
final List<? extends RatedResolveResult> members = targetType.resolveMember(PyNames.GET, expression, AccessDirection.READ,
|
final List<? extends RatedResolveResult> members = targetType.resolveMember(PyNames.DUNDER_GET, expression, AccessDirection.READ,
|
||||||
resolveContext);
|
resolveContext);
|
||||||
if (members == null || members.isEmpty()) return null;
|
if (members == null || members.isEmpty()) return null;
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ public final class PyDescriptorTypeUtil {
|
|||||||
instanceTypeArgument = PyNoneType.INSTANCE;
|
instanceTypeArgument = PyNoneType.INSTANCE;
|
||||||
}
|
}
|
||||||
List<PyType> argumentTypes = List.of(instanceArgumentType, instanceTypeArgument);
|
List<PyType> argumentTypes = List.of(instanceArgumentType, instanceTypeArgument);
|
||||||
PyType type = PySyntheticCallHelper.getCallTypeByFunctionName(PyNames.GET, receiverType, argumentTypes, context);
|
PyType type = PySyntheticCallHelper.getCallTypeByFunctionName(PyNames.DUNDER_GET, receiverType, argumentTypes, context);
|
||||||
return Ref.create(type);
|
return Ref.create(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user