mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
Allow Annotation to contain any BaseExpression
An `Annotation` can contain any `BaseExpression`, not just the short
list of types we had listed.
For example, this is valid syntax:
val: 1 + 2 = None
This commit is contained in:
parent
2ba295cc01
commit
4a84389fed
1 changed files with 1 additions and 1 deletions
|
|
@ -1291,7 +1291,7 @@ class Annotation(CSTNode):
|
|||
|
||||
#: The annotation's value itself. This is the part of the annotation after the
|
||||
#: colon or arrow.
|
||||
annotation: Union[Name, Attribute, BaseString, Subscript]
|
||||
annotation: Union[BaseExpression]
|
||||
|
||||
whitespace_before_indicator: Union[
|
||||
BaseParenthesizableWhitespace, MaybeSentinel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue