[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:
Daniil Kalinin
2024-10-02 17:54:34 +02:00
committed by intellij-monorepo-bot
parent c653a43cab
commit 7d891602cf
2 changed files with 3 additions and 3 deletions

View File

@@ -72,7 +72,7 @@ public final @NonNls class PyNames {
public static final String NEW = "__new__";
public static final String GETATTR = "__getattr__";
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 __CLASS__ = "__class__";
public static final String DUNDER_METACLASS = "__metaclass__";

View File

@@ -24,7 +24,7 @@ public final class PyDescriptorTypeUtil {
if (targetType == null || targetType.isDefinition()) return null;
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);
if (members == null || members.isEmpty()) return null;
@@ -61,7 +61,7 @@ public final class PyDescriptorTypeUtil {
instanceTypeArgument = PyNoneType.INSTANCE;
}
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);
}
}