mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
Restored None, False, True as non-keywords (reserved words) in PY2 (PY-23305, PY-23364)
Typeshed doesn't contain the definitions for them in __builtins__.pyi so we have to provide types and detect the builtin status for these words as a special case.
This commit is contained in:
committed by
Andrey Vlasovskikh
parent
859ed8fb1c
commit
91a45bf7ed
@@ -13,8 +13,8 @@ PyFile:BlockWithoutColon.py
|
||||
PyWhilePart
|
||||
PsiElement(Py:WHILE_KEYWORD)('while')
|
||||
PsiWhiteSpace(' ')
|
||||
PyBoolLiteralExpression
|
||||
PsiElement(Py:TRUE_KEYWORD)('True')
|
||||
PyReferenceExpression: True
|
||||
PsiElement(Py:IDENTIFIER)('True')
|
||||
PsiErrorElement:Colon expected
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
|
||||
@@ -12,8 +12,8 @@ PyFile:ErrorInParameterList.py
|
||||
PyNamedParameter('filds')
|
||||
PsiElement(Py:IDENTIFIER)('filds')
|
||||
PsiElement(Py:EQ)('=')
|
||||
PyNoneLiteralExpression
|
||||
PsiElement(Py:NONE_KEYWORD)('None')
|
||||
PyReferenceExpression: None
|
||||
PsiElement(Py:IDENTIFIER)('None')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:formal parameter name expected
|
||||
|
||||
@@ -19,8 +19,8 @@ PyFile:LambdaComprehension.py
|
||||
<empty list>
|
||||
PsiElement(Py:COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
PyBoolLiteralExpression
|
||||
PsiElement(Py:TRUE_KEYWORD)('True')
|
||||
PyReferenceExpression: True
|
||||
PsiElement(Py:IDENTIFIER)('True')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PyLambdaExpression
|
||||
@@ -29,8 +29,8 @@ PyFile:LambdaComprehension.py
|
||||
<empty list>
|
||||
PsiElement(Py:COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
PyBoolLiteralExpression
|
||||
PsiElement(Py:FALSE_KEYWORD)('False')
|
||||
PyReferenceExpression: False
|
||||
PsiElement(Py:IDENTIFIER)('False')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:IF_KEYWORD)('if')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
@@ -14,8 +14,8 @@ PyFile:NotClosedSlice.py
|
||||
PyIfPartIf
|
||||
PsiElement(Py:IF_KEYWORD)('if')
|
||||
PsiWhiteSpace(' ')
|
||||
PyBoolLiteralExpression
|
||||
PsiElement(Py:TRUE_KEYWORD)('True')
|
||||
PyReferenceExpression: True
|
||||
PsiElement(Py:IDENTIFIER)('True')
|
||||
PsiElement(Py:COLON)(':')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStatementList
|
||||
|
||||
@@ -3,8 +3,8 @@ PyFile:ResetAfterSemicolon.py
|
||||
PyIfPartIf
|
||||
PsiElement(Py:IF_KEYWORD)('if')
|
||||
PsiWhiteSpace(' ')
|
||||
PyBoolLiteralExpression
|
||||
PsiElement(Py:TRUE_KEYWORD)('True')
|
||||
PyReferenceExpression: True
|
||||
PsiElement(Py:IDENTIFIER)('True')
|
||||
PsiElement(Py:COLON)(':')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStatementList
|
||||
|
||||
Reference in New Issue
Block a user