Example #1
0
    def _repr_pretty_(self, p, cycle):
        if cycle:
            p.text(repr(self))
        else:
            blend_mode = self.blend_mode
            if blend_mode is not None:
                blend_mode = BlendMode.name_of(blend_mode)

            sub_type = self.sub_type
            if sub_type is not None:
                sub_type = SectionDividerSub.name_of(sub_type)

            p.begin_group(2, "Divider(")
            p.begin_group(0)

            p.break_()
            p.text("type = %s," % SectionDivider.name_of(self.type))
            p.break_()
            p.text("blend_mode = %s," % blend_mode)
            p.break_()
            p.text("sub_type = %s" % sub_type)

            p.end_group(2)
            p.break_()
            p.end_group(0, ")")
Example #2
0
    def __repr__(self):
        blend_mode = self.blend_mode
        if blend_mode is not None:
            blend_mode = BlendMode.name_of(blend_mode)

        sub_type = self.sub_type
        if sub_type is not None:
            sub_type = SectionDividerSub.name_of(sub_type)

        return "Divider(type=%s, blend_mode=%s, sub_type=%s)" % (
            SectionDivider.name_of(self.type),
            blend_mode,
            sub_type,
        )
Example #3
0
 def __repr__(self):
     return "Divider(%s %r %s, %s)" % (
         self.block, self.type, SectionDivider.name_of(self.type), self.key)
Example #4
0
 def __repr__(self):
     return "Divider(%s %r %s, %s)" % (
         self.block, self.type, SectionDivider.name_of(self.type), self.key)