[python] Add a comment explaining the meaning of TypeEvalContext.Key

GitOrigin-RevId: eddc81498f070efffb79c0698bb30e69f35b289b
This commit is contained in:
Mikhail Golubev
2025-01-22 16:49:41 +00:00
committed by intellij-monorepo-bot
parent bfffa97843
commit ffb28d92c9
@@ -23,6 +23,12 @@ import java.util.Map;
public final class TypeEvalContext {
/**
* This class ensures that only {@link TypeEvalContext} instances can directly invoke
* {@link PyTypedElement#getType(TypeEvalContext, Key)} and everybody else has to
* access its result though {@link #getType(PyTypedElement)} or {@link #getReturnType(PyCallable)}.
* Hence, the inferred type information cannot bypass caching in {@link TypeEvalContext}.
*/
public static final class Key {
private static final Key INSTANCE = new Key();