Lines Matching refs:enum_class
171 enum_class = super().__new__(metacls, cls, bases, classdict)
172 enum_class._member_names_ = [] # names in definition order
173 enum_class._member_map_ = {} # name->value map
174 enum_class._member_type_ = member_type
178 dynamic_attributes = {k for c in enum_class.mro()
183 enum_class._value2member_map_ = {}
200 _make_class_unpicklable(enum_class)
215 enum_member = __new__(enum_class)
219 enum_member = __new__(enum_class, *args)
227 enum_member.__objclass__ = enum_class
231 for name, canonical_member in enum_class._member_map_.items():
237 enum_class._member_names_.append(member_name)
241 setattr(enum_class, member_name, enum_member)
243 enum_class._member_map_[member_name] = enum_member
248 enum_class._value2member_map_[value] = enum_member
259 class_method = getattr(enum_class, name)
263 setattr(enum_class, name, enum_method)
271 enum_class.__new_member__ = __new__
272 enum_class.__new__ = Enum.__new__
278 if _order_ != enum_class._member_names_:
281 return enum_class
427 enum_class = metacls.__new__(metacls, class_name, bases, classdict)
437 _make_class_unpicklable(enum_class)
439 enum_class.__module__ = module
441 enum_class.__qualname__ = qualname
443 return enum_class