optimize imports sorts them according to PEP-8 (PY-2367)

This commit is contained in:
Dmitry Jemerov
2012-10-02 20:04:45 +02:00
parent 543d2a61c5
commit 6bb86279d1
16 changed files with 225 additions and 48 deletions
@@ -56,9 +56,9 @@ public abstract class PyElementGenerator {
@NotNull
public abstract PyCallExpression createCallExpression(final LanguageLevel langLevel, String functionName);
public abstract PyImportStatement createImportStatementFromText(String text);
public abstract PyImportStatement createImportStatementFromText(final LanguageLevel languageLevel, String text);
public abstract PyImportElement createImportElement(String name);
public abstract PyImportElement createImportElement(final LanguageLevel languageLevel, String name);
@NotNull
public abstract <T> T createFromText(LanguageLevel langLevel, Class<T> aClass, final String text);
@@ -62,4 +62,9 @@ public interface PyFile extends PyElement, PsiFile, PyDocStringOwner, ScopeOwner
* @return the deprecation message or null if the function is not deprecated.
*/
String getDeprecationMessage();
/**
* Returns the sequential list of import statements in the beginning of the file.
*/
List<PyImportStatementBase> getImportBlock();
}