Skip to content

Commit b76a853

Browse files
authored
Allowed bare typing.Final in an annotation expression (#1915)
The current grammar only allows `typing.Final[...]`, but not `typing.Final`.
1 parent 4cfdb36 commit b76a853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/spec/annotations.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The following grammar describes the allowed elements of type and annotation expr
110110
: | <NotRequired> '[' `annotation_expression` ']'
111111
: | <ReadOnly> '[' `annotation_expression`']'
112112
: | <ClassVar> '[' `annotation_expression`']'
113-
: | <Final> '[' `annotation_expression`']'
113+
: | <Final> ('[' `annotation_expression`']')?
114114
: | <InitVar> '[' `annotation_expression` ']'
115115
: | <Annotated> '[' `annotation_expression` ','
116116
: expression (',' expression)* ']'

0 commit comments

Comments
 (0)