Lines Matching refs:enum_class
215 enum_class = super().__new__(metacls, cls, bases, classdict, **kwds)
216 enum_class._member_names_ = [] # names in definition order
217 enum_class._member_map_ = {} # name->value map
218 enum_class._member_type_ = member_type
223 k for c in enum_class.mro()
229 enum_class._value2member_map_ = {}
248 _make_class_unpicklable(enum_class)
271 _make_class_unpicklable(enum_class)
285 enum_member = __new__(enum_class)
289 enum_member = __new__(enum_class, *args)
297 enum_member.__objclass__ = enum_class
301 for name, canonical_member in enum_class._member_map_.items():
307 enum_class._member_names_.append(member_name)
311 setattr(enum_class, member_name, enum_member)
313 enum_class._member_map_[member_name] = enum_member
318 enum_class._value2member_map_[value] = enum_member
329 class_method = getattr(enum_class, name)
333 setattr(enum_class, name, enum_method)
341 enum_class.__new_member__ = __new__
342 enum_class.__new__ = Enum.__new__
348 if _order_ != enum_class._member_names_:
351 return enum_class
518 enum_class = metacls.__new__(metacls, class_name, bases, classdict)
528 _make_class_unpicklable(enum_class)
530 enum_class.__module__ = module
532 enum_class.__qualname__ = qualname
534 return enum_class