File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,14 @@ class _MISSING_TYPE:
166
166
_EMPTY_METADATA = types .MappingProxyType ({})
167
167
168
168
# Markers for the various kinds of fields and pseudo-fields.
169
- _FIELD = object () # An actual field.
170
- _FIELD_CLASSVAR = object () # Not a field, but a ClassVar.
171
- _FIELD_INITVAR = object () # Not a field, but an InitVar.
169
+ class _FIELD_BASE :
170
+ def __init__ (self , name ):
171
+ self .name = name
172
+ def __repr__ (self ):
173
+ return self .name
174
+ _FIELD = _FIELD_BASE ('_FIELD' )
175
+ _FIELD_CLASSVAR = _FIELD_BASE ('_FIELD_CLASSVAR' )
176
+ _FIELD_INITVAR = _FIELD_BASE ('_FIELD_INITVAR' )
172
177
173
178
# The name of an attribute on the class where we store the Field
174
179
# objects. Also used to check if a class is a Data Class.
@@ -237,7 +242,8 @@ def __repr__(self):
237
242
f'repr={ self .repr !r} ,'
238
243
f'hash={ self .hash !r} ,'
239
244
f'compare={ self .compare !r} ,'
240
- f'metadata={ self .metadata !r} '
245
+ f'metadata={ self .metadata !r} ,'
246
+ f'_field_type={ self ._field_type } '
241
247
')' )
242
248
243
249
# This is used to support the PEP 487 __set_name__ protocol in the
You can’t perform that action at this time.
0 commit comments