PY-74171 Inherit PyKeywordArgument and PyReferenceExpression from PsiExternalReferenceHost

This allows using Symbol API to create references in PyKeywordArgument or PyReferenceExpression elements.

GitOrigin-RevId: 19545edec1499de66fb7744e7f8e3cb7f4ea85d3
This commit is contained in:
Artem Ivanov
2024-09-02 22:34:27 +05:00
committed by intellij-monorepo-bot
parent f224638f0f
commit 66fb06fcd9
2 changed files with 4 additions and 2 deletions

View File

@@ -1,12 +1,13 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.psi;
import com.intellij.model.psi.PsiExternalReferenceHost;
import com.intellij.psi.PsiNamedElement;
import com.jetbrains.python.ast.PyAstKeywordArgument;
import org.jetbrains.annotations.Nullable;
public interface PyKeywordArgument extends PyAstKeywordArgument, PyExpression, PsiNamedElement {
public interface PyKeywordArgument extends PyAstKeywordArgument, PyExpression, PsiNamedElement, PsiExternalReferenceHost {
@Override
@Nullable
default PyExpression getValueExpression() {

View File

@@ -15,6 +15,7 @@
*/
package com.jetbrains.python.psi;
import com.intellij.model.psi.PsiExternalReferenceHost;
import com.intellij.psi.PsiPolyVariantReference;
import com.jetbrains.python.ast.PyAstReferenceExpression;
import com.jetbrains.python.psi.resolve.PyResolveContext;
@@ -26,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.function.Predicate;
public interface PyReferenceExpression extends PyAstReferenceExpression, PyQualifiedExpression, PyReferenceOwner {
public interface PyReferenceExpression extends PyAstReferenceExpression, PyQualifiedExpression, PyReferenceOwner, PsiExternalReferenceHost {
PyReferenceExpression[] EMPTY_ARRAY = new PyReferenceExpression[0];
@Override