don't iterate through names in __all__ which are not valid Python identifiers (PY-5503)

This commit is contained in:
Dmitry Jemerov
2012-01-19 18:49:19 +01:00
parent 88a8f35e63
commit 437d9af5a9
2 changed files with 4 additions and 1 deletions
@@ -185,6 +185,9 @@ public class PyFileImpl extends PsiFileBase implements PyFile, PyExpression {
if (remainingDunderAll != null) {
for (String s: remainingDunderAll) {
if (!PyNames.isIdentifier(s)) {
continue;
}
if (!processor.execute(new LightNamedElement(myManager, PythonLanguage.getInstance(), s), resolveState)) return false;
}
}
@@ -1,2 +1,2 @@
__all__ = ['xyzzy', 'shazam']
__all__ = ['xyzzy', 'shazam', 'xy is not a valid python identifier']