mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-21339: Use AppConfig for INSTALLED_APPS for Django 1.9+
* AppConfig added * #getTopLevelClasses() marked @NotNull since the only implementation is @NotNull * QualifiedNameResolverImpl verbosity improved
This commit is contained in:
@@ -27,6 +27,7 @@ import java.util.List;
|
||||
public interface PyFile extends PyElement, PsiFile, PyDocStringOwner, ScopeOwner {
|
||||
List<PyStatement> getStatements();
|
||||
|
||||
@NotNull
|
||||
List<PyClass> getTopLevelClasses();
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -367,6 +367,7 @@ public class PyFileImpl extends PsiFileBase implements PyFile, PyExpression {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public List<PyClass> getTopLevelClasses() {
|
||||
return PyPsiUtils.collectStubChildren(this, getStub(), PyElementTypes.CLASS_DECLARATION);
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ public class QualifiedNameResolverImpl implements RootVisitor, QualifiedNameReso
|
||||
RootVisitorHost.visitSdkRoots(myContext.getSdk(), this);
|
||||
}
|
||||
else {
|
||||
throw new IllegalStateException();
|
||||
throw new IllegalStateException("Context is empty. Provide some context: module, file, sdk, etc");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user