예제 #1
0
 def of_string_header(
         header: ToStringObject,
         path: PathDescriberForPrimitive) -> SequenceRenderer[MinorBlock]:
     return HeaderAndPathMinorBlocks(
         header_rendering.SimpleHeaderMinorBlockRenderer(header),
         PathRepresentationsRenderersForPrimitive(path),
     )
예제 #2
0
def line_header_block__primitive(header: Any,
                                 path: PathDescriberForPrimitive,
                                 explanation: Optional[SequenceRenderer[LineElement]] = None,
                                 ) -> Renderer[MajorBlock]:
    return path_rendering.HeaderAndPathMajorBlock(
        header_rendering.SimpleHeaderMinorBlockRenderer(header),
        path_rendering.PathRepresentationsRenderersForPrimitive(path),
        explanation,
    )
예제 #3
0
def line_header__ddv(header: Any,
                     path: PathDescriberForDdv,
                     explanation: Optional[SequenceRenderer[LineElement]] = None,
                     ) -> TextRenderer:
    return path_rendering.HeaderAndPathMajorBlocks(
        header_rendering.SimpleHeaderMinorBlockRenderer(header),
        path_rendering.PathRepresentationsRenderersForDdv(path),
        explanation,
    )
예제 #4
0
def w_details(header: ToStringObject,
              details: SequenceRenderer[MinorBlock]) -> Renderer[MajorBlock]:
    return comp_rend.MajorBlockR(
        combinators.PrependR(
            header_rendering.SimpleHeaderMinorBlockRenderer(header),
            combinators.Indented(details)))