if getattr(b, _PARAMS).frozen:
any_frozen_base = True
- # Annotations that are defined in this class (not in base
- # classes). If __annotations__ isn't present, then this class
- # adds no new annotations. We use this to compute fields that are
- # added by this class.
+ # Annotations defined specifically in this class (not in base classes).
#
# Fields are found from cls_annotations, which is guaranteed to be
# ordered. Default values are from class attributes, if a field
# actual default value. Pseudo-fields ClassVars and InitVars are
# included, despite the fact that they're not real fields. That's
# dealt with later.
- cls_annotations = cls.__dict__.get('__annotations__', {})
+ cls_annotations = inspect.get_annotations(cls)
# Now find fields in our class. While doing so, validate some
# things, and set the default values (as class attributes) where