mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote branch 'origin/master'
This commit is contained in:
@@ -112,6 +112,7 @@ target(name: "compile", description: "Compile module python") {
|
||||
include(name: "**/?*.tld")
|
||||
include(name: "**/?*.py")
|
||||
include(name: "**/?*.ft")
|
||||
include(name: "**/?*.dic")
|
||||
}
|
||||
|
||||
ant.loadfile(srcfile: "${ideaHome}/build.txt", property: "ideaBuildNumber") {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class PyFileElementType extends IStubFileElementType<PyFileStub> {
|
||||
|
||||
@Override
|
||||
public int getStubVersion() {
|
||||
return 40;
|
||||
return 41;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -313,12 +313,22 @@ public class PyClassImpl extends PyPresentableElementImpl<PyClassStub> implement
|
||||
element = ResolveImportUtil.resolveImportElement((PyImportElement)element);
|
||||
}
|
||||
if (!(element instanceof NameDefiner)) {
|
||||
return new PyClassRef(qualifiedName.toString());
|
||||
currentParent = null;
|
||||
break;
|
||||
}
|
||||
currentParent = (NameDefiner)element;
|
||||
}
|
||||
|
||||
return new PyClassRef(currentParent);
|
||||
if (currentParent != null) {
|
||||
return new PyClassRef(currentParent);
|
||||
}
|
||||
if (qualifiedName.getComponentCount() == 1) {
|
||||
final PyClass builtinClass = PyBuiltinCache.getInstance(parent).getClass(qualifiedName.getComponents().get(0));
|
||||
if (builtinClass != null) {
|
||||
return new PyClassRef(builtinClass);
|
||||
}
|
||||
}
|
||||
return new PyClassRef(qualifiedName.toString());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -135,7 +135,7 @@ public abstract class PythonCommandLineState extends CommandLineState {
|
||||
PythonRunConfigurationExtensionsManager.getInstance()
|
||||
.patchCommandLine(myConfig, runnerSettings, commandLine, getConfigurationSettings().getRunnerId());
|
||||
|
||||
if (sdk.getSdkAdditionalData() instanceof PythonRemoteSdkAdditionalData) {
|
||||
if (sdk != null && sdk.getSdkAdditionalData() instanceof PythonRemoteSdkAdditionalData) {
|
||||
if (PythonRemoteInterpreterManager.EP_NAME.getExtensions().length > 0) {
|
||||
ProcessHandler processHandler = PythonRemoteInterpreterManager.EP_NAME.getExtensions()[0].doCreateProcess(myConfig.getProject(), (PythonRemoteSdkAdditionalData)sdk.getSdkAdditionalData(), commandLine);
|
||||
ProcessTerminatedListener.attach(processHandler);
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
class Foo(object):
|
||||
pass
|
||||
@@ -338,6 +338,14 @@ public class PyStubsTest extends PyTestCase {
|
||||
assertNotParsed(file);
|
||||
}
|
||||
|
||||
public void testBuiltinAncestor() {
|
||||
final PyFileImpl file = (PyFileImpl) getTestFile();
|
||||
final PyClass pyClass = file.getTopLevelClasses().get(0);
|
||||
final PyClassRef classRef = pyClass.iterateAncestors().iterator().next();
|
||||
assertNotNull(classRef.getPyClass());
|
||||
assertNotParsed(file);
|
||||
}
|
||||
|
||||
private void ensureVariableNotInIndex(String name) {
|
||||
getTestFile();
|
||||
GlobalSearchScope scope = GlobalSearchScope.allScope(myFixture.getProject());
|
||||
|
||||
Reference in New Issue
Block a user