mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed CCE in PythonDocumentationProvider (PY-7202)
This commit is contained in:
@@ -470,9 +470,12 @@ public class PythonDocumentationProvider extends AbstractDocumentationProvider i
|
||||
|
||||
@Nullable
|
||||
private static PyClass inferClassOfParameter(PsiElement context) {
|
||||
final PyType type = ((PyNamedParameter)context).getType(TypeEvalContext.fast());
|
||||
if (type instanceof PyClassType)
|
||||
return ((PyClassType)type).getPyClass();
|
||||
if (context instanceof PyNamedParameter) {
|
||||
final PyType type = ((PyNamedParameter)context).getType(TypeEvalContext.fast());
|
||||
if (type instanceof PyClassType) {
|
||||
return ((PyClassType)type).getPyClass();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user