Skip to content

Commit

Permalink
Allowed bare typing.Final in an annotation expression (#1915)
Browse files Browse the repository at this point in the history
The current grammar only allows `typing.Final[...]`, but not `typing.Final`.
  • Loading branch information
superbobry authored Jan 30, 2025
1 parent 4cfdb36 commit b76a853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/spec/annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The following grammar describes the allowed elements of type and annotation expr
: | <NotRequired> '[' `annotation_expression` ']'
: | <ReadOnly> '[' `annotation_expression`']'
: | <ClassVar> '[' `annotation_expression`']'
: | <Final> '[' `annotation_expression`']'
: | <Final> ('[' `annotation_expression`']')?
: | <InitVar> '[' `annotation_expression` ']'
: | <Annotated> '[' `annotation_expression` ','
: expression (',' expression)* ']'
Expand Down

0 comments on commit b76a853

Please sign in to comment.