From 1b2f98312c186cac3ecf5221f00b499ca02c184a Mon Sep 17 00:00:00 2001 From: Sergei Lebedev <185856+superbobry@users.noreply.github.com> Date: Thu, 30 Jan 2025 20:47:06 +0000 Subject: [PATCH] Allowed bare `typing.Final` in an annotation expression The current grammar only allows `typing.Final[...]`, but not `typing.Final`. --- docs/spec/annotations.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/annotations.rst b/docs/spec/annotations.rst index 3e56e5ce..18f9f6a6 100644 --- a/docs/spec/annotations.rst +++ b/docs/spec/annotations.rst @@ -110,7 +110,7 @@ The following grammar describes the allowed elements of type and annotation expr : | '[' `annotation_expression` ']' : | '[' `annotation_expression`']' : | '[' `annotation_expression`']' - : | '[' `annotation_expression`']' + : | ('[' `annotation_expression`']')? : | '[' `annotation_expression` ']' : | '[' `annotation_expression` ',' : expression (',' expression)* ']'