def next_partial_definition_field(): """ Return the next field likely to contain a partial definition. """ return first(fields( template.content, with_name_like=pattern, with_context_like=pattern, strictly_matching=False)) # match either name or context, or both
def next_partial_definition_field(): """ Return the next field likely to contain a partial definition. """ return first( fields(template.content, with_name_like=pattern, with_context_like=pattern, strictly_matching=False) ) # match either name or context, or both
def next_include_field(): """ Return the next probable include/inline field. """ return first(fields(template.content, with_name_like='include|inline'))
def next_date_field(): """ Return the next probable date field. """ return first(fields(template.content, with_name_like='date'))
def next_image_field() -> TemplateField: """ Return the next probable image field. """ return first(fields(template.content, with_name_like=supported_images_pattern))
def next_image_field() -> TemplateField: """ Return the next probable image field. """ return first( fields(template.content, with_name_like=supported_images_pattern))