from enum import Enum

class BitEnum(int, Enum):
    def __new__(cls, *args):
        value = 1 << len(cls.__members__)
        return int.__new__(cls, value)

formats = BitEnum("formats", "i b blockquote")

@@ -10,16 +10,19 @@
  import 
+Int
 Enum%0A%0Acl
@@ -29,182 +29,70 @@
 ass 
-BitEnum(int, Enum):%0A    def __new__(cls, *args):%0A        value = 1 %3C%3C len(cls.__members__)%0A        return int.__new__(cls, value)%0A%0Aformats = BitEnum(%22formats%22, %22i b blockquote%22
+formats(IntEnum):%0A    i, b, blockquote = (1%3C%3Ci for i in range(3)
 )%0A

Remove BitEnum class, use IntEnum