mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
importing 'with_statement' not as first in list (demonstrative case for PY-1).
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# with = 1 # legal identifier
|
||||
# with = 1
|
||||
with = 1
|
||||
# from __future__ import with_statement, nested_scopes
|
||||
from __future__ import with_statement, nested_scopes
|
||||
# from __future__ import nested_scopes, with_statement
|
||||
from __future__ import nested_scopes, with_statement
|
||||
# with x.y(z)[t] as y: pass
|
||||
with x.y(z)[t] as y: pass
|
||||
# with = 1 # now illegal
|
||||
|
||||
@@ -12,7 +12,7 @@ PyFile:WithStatement2.py
|
||||
PyNumericLiteralExpression
|
||||
PsiElement(Py:INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiComment(Py:END_OF_LINE_COMMENT)('# from __future__ import with_statement, nested_scopes')
|
||||
PsiComment(Py:END_OF_LINE_COMMENT)('# from __future__ import nested_scopes, with_statement')
|
||||
PsiWhiteSpace('\n')
|
||||
PyFromImportStatement
|
||||
PsiElement(Py:FROM_KEYWORD)('from')
|
||||
@@ -23,13 +23,13 @@ PyFile:WithStatement2.py
|
||||
PsiElement(Py:IMPORT_KEYWORD)('import')
|
||||
PsiWhiteSpace(' ')
|
||||
PyImportElement
|
||||
PyReferenceExpression: with_statement
|
||||
PsiElement(Py:IDENTIFIER)('with_statement')
|
||||
PyReferenceExpression: nested_scopes
|
||||
PsiElement(Py:IDENTIFIER)('nested_scopes')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PyImportElement
|
||||
PyReferenceExpression: nested_scopes
|
||||
PsiElement(Py:IDENTIFIER)('nested_scopes')
|
||||
PyReferenceExpression: with_statement
|
||||
PsiElement(Py:IDENTIFIER)('with_statement')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiComment(Py:END_OF_LINE_COMMENT)('# with x.y(z)[t] as y: pass')
|
||||
PsiWhiteSpace('\n')
|
||||
|
||||
Reference in New Issue
Block a user