def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: purpose = self.doc.purpose() abstract_paras = docs.paras(purpose.single_line_description) return doc.ArticleContents( abstract_paras, self._section_contents(environment, purpose.rest))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: purpose = self.concept.purpose() sub_sections = [] sub_sections += self._rest_section(purpose) sub_sections += self._see_also_sections(environment) return doc.ArticleContents(docs.paras(purpose.single_line_description), doc.SectionContents([], sub_sections))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: initial_paragraphs = [ self._type_paragraph(), ] sub_sections = description_section_if_non_empty( self.builtin_doc.description) sub_sections += self._see_also_sections(environment) return doc.ArticleContents( docs.paras(self.builtin_doc.single_line_description()), doc.SectionContents(initial_paragraphs, sub_sections))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: purpose = self.conf_param.purpose() sub_sections = [ docs.section('Default Value', [self.conf_param.default_value_para()]) ] sub_sections += self._rest_section(purpose) sub_sections += self._see_also_sections(environment) return doc.ArticleContents(docs.paras(purpose.single_line_description), docs.SectionContents([], sub_sections))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: initial_paragraphs = [] invokation_variants = self.syntax_element.invokation_variants() if len(invokation_variants) > 1: initial_paragraphs.append(headers.FORMS_PARA) initial_paragraphs += invokation_variants_paragraphs( None, invokation_variants, self.syntax_element.syntax_element_descriptions()) return doc.ArticleContents( docs.paras(self.syntax_element.single_line_description()), doc.SectionContents(initial_paragraphs, self._sub_sections(environment)))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: srd = self.suite_reporter initial_paragraphs = srd.main_description_rest() initial_paragraphs.extend(self._default_reporter_info()) sub_sections = [] names_and_contents = [ ('Output syntax', srd.syntax_of_output()), ('Exit code', srd.exit_code_description()), ] append_sections_if_contents_is_non_empty(sub_sections, names_and_contents) sub_sections += see_also_sections(srd.see_also_targets(), environment) return doc.ArticleContents(docs.paras(srd.single_line_description()), doc.SectionContents(initial_paragraphs, sub_sections))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: self.rendering_environment = environment initial_paragraphs = self._default_reporter_info() initial_paragraphs.extend(self.actor.main_description_rest()) sub_sections = [] append_sections_if_contents_is_non_empty( sub_sections, [ (self._parser.format('{act_phase} phase contents'), self.actor.act_phase_contents()), (self._parser.format('Syntax of {act_phase} phase contents'), self.actor.act_phase_contents_syntax()), (headers.NOTES__HEADER__CAPITALIZED, self.actor.notes()), ] ) sub_sections += see_also_sections(self.actor.see_also_targets(), environment) return doc.ArticleContents(docs.paras(self.actor.single_line_description()), doc.SectionContents(initial_paragraphs, sub_sections))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: sub_sections = [] if self.doc.invokation_variants(): sub_sections.append( synopsis_section( invokation_variants_content(None, self.doc.invokation_variants(), self.doc.syntax_elements()))) append_section_if_contents_is_non_empty( sub_sections, 'Description', self.doc.main_description_rest()) sub_sections += see_also_sections(self.doc.see_also_targets(), environment, uppercase_title=True) return doc.ArticleContents( docs.paras(self.doc.single_line_description()), doc.SectionContents([], sub_sections))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: documentation = self.documentation sub_sections = [] if documentation.invokation_variants(): sub_sections.append( synopsis_section( invokation_variants_content( documentation.instruction_name(), documentation.invokation_variants(), documentation.syntax_element_descriptions()))) sub_sections += self._main_description_rest_sections() sub_sections += self._outcome() sub_sections += self._notes() sub_sections += see_also_sections(documentation.see_also_targets(), environment, uppercase_title=True) abstract_paragraphs = docs.paras( self.documentation.single_line_description()) return doc.ArticleContents(abstract_paragraphs, doc.SectionContents([], sub_sections))
def _strip_article_contents( self, contents: document.ArticleContents) -> document.ArticleContents: return document.ArticleContents( contents.abstract_paragraphs, self._strip_section_contents(contents.section_contents))
def apply(self, environment: ConstructionEnvironment) -> doc.ArticleContents: return doc.ArticleContents( docs.paras('abstract paragraph'), doc.SectionContents(docs.paras('initial paragraph'), []))