]> 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:38:45 +0000 (06:38 -0800)
committerGitHub <noreply@github.com>
Tue, 25 Jan 2022 14:38:45 +0000 (06:38 -0800)
commit41e0aead3defa6d0486514e313b6975fbf375998
treee760cd3e3ad5bfed2240c77cdb9581331e90a8a0
parent367a37a18c4411c42da9006947dd95b0afbdf200
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]