summaryrefslogtreecommitdiffstats
path: root/Lib/dataclasses.py
diff options
context:
space:
mode:
authorEric V. Smith <ericvsmith@users.noreply.github.com>2018-03-21 21:10:22 (GMT)
committerGitHub <noreply@github.com>2018-03-21 21:10:22 (GMT)
commit8e4560a9da6a02aa157dd7df8bd0be0d258c0a73 (patch)
tree0276b5db71dc9fe964b69024b05e66ced4c6e809 /Lib/dataclasses.py
parentdec1c7786f642049c2508e909442189dc043b5da (diff)
downloadcpython-8e4560a9da6a02aa157dd7df8bd0be0d258c0a73.zip
cpython-8e4560a9da6a02aa157dd7df8bd0be0d258c0a73.tar.gz
cpython-8e4560a9da6a02aa157dd7df8bd0be0d258c0a73.tar.bz2
Add 'Field' to dataclasses.__all__. (GH-6182)
- Add missing 'Field' to __all__. - Improve tests to catch this.
Diffstat (limited to 'Lib/dataclasses.py')
-rw-r--r--Lib/dataclasses.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py
index d616432..41b5b5d 100644
--- a/Lib/dataclasses.py
+++ b/Lib/dataclasses.py
@@ -5,6 +5,7 @@ import inspect
__all__ = ['dataclass',
'field',
+ 'Field',
'FrozenInstanceError',
'InitVar',
'MISSING',
@@ -513,7 +514,7 @@ def _get_field(cls, a_name, a_type):
# and InitVars are also returned, but marked as such (see
# f._field_type).
- # If the default value isn't derived from field, then it's
+ # If the default value isn't derived from Field, then it's
# only a normal default value. Convert it to a Field().
default = getattr(cls, a_name, MISSING)
if isinstance(default, Field):