mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-87182 type representation: fix issue with single star parameter
GitOrigin-RevId: aa60094e6fbb8cc4a9e0c129accc917b7933c7a4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a0c7b5e7b6
commit
c7435bdc99
+2
-1
@@ -18,6 +18,7 @@ package com.jetbrains.python.codeInsight.typeRepresentation
|
||||
import com.intellij.lang.SyntaxTreeBuilder
|
||||
import com.intellij.openapi.util.NlsContexts
|
||||
import com.intellij.psi.tree.IElementType
|
||||
import com.jetbrains.python.PYTHON_VERSION_ARG
|
||||
import com.jetbrains.python.PyElementTypes
|
||||
import com.jetbrains.python.PyParsingBundle
|
||||
import com.jetbrains.python.PyTokenTypes
|
||||
@@ -252,7 +253,7 @@ class PyTypeRepresentationParser : PyParser() {
|
||||
}
|
||||
namedVarargMarker.done(PyTypeRepresentationElementTypes.NAMED_PARAMETER_TYPE)
|
||||
}
|
||||
else {
|
||||
else if (atToken(PyTokenTypes.IDENTIFIER)) {
|
||||
// Unnamed *args, just parse the type
|
||||
parseExpression()
|
||||
}
|
||||
|
||||
@@ -4,11 +4,7 @@ TypeRepresentation:a.pythonTypeRepresentation
|
||||
PsiElement(Py:LPAR)('(')
|
||||
PyStarExpression
|
||||
PsiElement(Py:MULT)('*')
|
||||
PsiErrorElement:Unexpected token
|
||||
<empty list>
|
||||
PsiElement(Py:RPAR)(')')
|
||||
PsiErrorElement:')' expected
|
||||
<empty list>
|
||||
PsiElement(Py:RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:RARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
Reference in New Issue
Block a user