]> granicus.if.org Git - python/commit
bpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 22 Mar 2018 20:58:59 +0000 (13:58 -0700)
committerGitHub <noreply@github.com>
Thu, 22 Mar 2018 20:58:59 +0000 (13:58 -0700)
commit3b4c6b16c597aa2356f5658dd67da7dcd4434038
tree23e31aafdafd837f54f5a2ce618147363057c5c0
parent5d8bb5d07be2a9205e7059090f0ac5360d36b217
bpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but doesn't have a type annotation. (GH-6192)

If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError.
(cherry picked from commit 56970b8ce9d23269d20a76f13c80e670c856ba7f)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Lib/dataclasses.py
Lib/test/test_dataclasses.py
Misc/NEWS.d/next/Library/2018-03-22-16-05-56.bpo-32505.YK1N8v.rst [new file with mode: 0644]