Right now, in some project code, we are looking at the field_type using the self.original_type but that can give us a string path like some.module, so it would be good to have a Field.instance_type that will convert to the actual type the instance is (you could use Field.type for this since that is currently just an alias for Field.interface_type).
That way, we don't have to keep adding gating logic like this when we are checking types:
val_type = self.original_type
if not isinstance(val_type, basestring):
if issubclass(val_type, (int, float, bool)):
pass
Right now, in some project code, we are looking at the field_type using the
self.original_type
but that can give us a string path likesome.module
, so it would be good to have aField.instance_type
that will convert to the actual type the instance is (you could use Field.type for this since that is currently just an alias for Field.interface_type).That way, we don't have to keep adding gating logic like this when we are checking types: