summaryrefslogtreecommitdiff
path: root/Lib/test/dataclass_textanno.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2019-12-09 09:54:20 -0500
committerƁukasz Langa <lukasz@langa.pl>2019-12-09 15:54:20 +0100
commitd219cc4180e7589807ebbef7421879f095e72a98 (patch)
tree851c77c76d776d146532fd16db6ccacbe7a1354e /Lib/test/dataclass_textanno.py
parentbba873e633f0f1e88ea12fb935cbd58faa77f976 (diff)
downloadcpython-git-d219cc4180e7589807ebbef7421879f095e72a98.tar.gz
bpo-34776: Fix dataclasses to support __future__ "annotations" mode (#9518)
Diffstat (limited to 'Lib/test/dataclass_textanno.py')
-rw-r--r--Lib/test/dataclass_textanno.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/dataclass_textanno.py b/Lib/test/dataclass_textanno.py
new file mode 100644
index 0000000000..3eb6c943d4
--- /dev/null
+++ b/Lib/test/dataclass_textanno.py
@@ -0,0 +1,12 @@
+from __future__ import annotations
+
+import dataclasses
+
+
+class Foo:
+ pass
+
+
+@dataclasses.dataclass
+class Bar:
+ foo: Foo