]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 25 Jan 2022 14:39:12 +0000 (06:39 -0800)
committerGitHub <noreply@github.com>
Tue, 25 Jan 2022 14:39:12 +0000 (06:39 -0800)
commitb0b8388a1c29dc9203dd1a9e8b1420a6a5e88c97
tree6210d7cbcb28e12f0cce997d02c29eb8b4020441
parent3178efbf06666409107237a3cfe61ba85a5d3a26
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit e1abffca45b60729c460e3e2ad50c8c1946cfd4e)

Co-authored-by: Gregory Beauregard <greg@greg.red>
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2022-01-24-23-55-30.bpo-46491.jmIKHo.rst [new file with mode: 0644]