Add 'Field' to dataclasses.__all__. (GH-6182)

- Add missing 'Field' to __all__.
- Improve tests to catch this.
This commit is contained in:
Eric V. Smith 2018-03-21 17:10:22 -04:00 committed by GitHub
parent dec1c7786f
commit 8e4560a9da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View file

@ -1,7 +1,8 @@
from dataclasses import (
dataclass, field, FrozenInstanceError, fields, asdict, astuple,
make_dataclass, replace, InitVar, Field, MISSING, is_dataclass,
)
# Deliberately use "from dataclasses import *". Every name in __all__
# is tested, so they all must be present. This is a way to catch
# missing ones.
from dataclasses import *
import pickle
import inspect