From 784905dbeff68cf788bbeefe0a675af1af04affc Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 25 Sep 2021 11:56:22 +0300 Subject: bpo-45166: fixes `get_type_hints` failure on `Final` (GH-28279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Langa Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> --- Lib/test/ann_module6.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Lib/test/ann_module6.py (limited to 'Lib/test/ann_module6.py') diff --git a/Lib/test/ann_module6.py b/Lib/test/ann_module6.py new file mode 100644 index 0000000000..679175669b --- /dev/null +++ b/Lib/test/ann_module6.py @@ -0,0 +1,7 @@ +# Tests that top-level ClassVar is not allowed + +from __future__ import annotations + +from typing import ClassVar + +wrong: ClassVar[int] = 1 -- cgit v1.2.1