mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-34776: Fix dataclasses to support __future__ "annotations" mode (#9518)
This commit is contained in:
parent
bba873e633
commit
d219cc4180
4 changed files with 78 additions and 34 deletions
12
Lib/test/dataclass_textanno.py
Normal file
12
Lib/test/dataclass_textanno.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
|
||||
|
||||
class Foo:
|
||||
pass
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Bar:
|
||||
foo: Foo
|
Loading…
Add table
Add a link
Reference in a new issue