nomenclate.core.formatter module¶
- class nomenclate.core.formatter.FormatString(format_string='')[source]
Bases:
object
- property format_order
- classmethod get_valid_format_order(format_target, format_order=None)[source]
Checks to see if the target format string follows the proper style
- classmethod parse_format_order(format_target)[source]
- Dissects the format string and gets the order of the tokens as it finds them l->r
Splits on camel case or periods/underscores Modified version from this: http://stackoverflow.com/questions/2277352/python-split-a-string-at-uppercase-letters
- Parameters
format_target – str, format string we want to swap to
- Returns
list(str), list of the matching tokens
- static remove_static_text(format_target)[source]
- static remove_tokens(format_target, format_order)[source]
- swap_format(format_target)[source]
- classmethod validate_matched_parenthesis(format_target)[source]
Adapted from https://stackoverflow.com/questions/6701853/parentheses-pairing-issue
- Parameters
format_order –
- Returns
- classmethod validate_no_token_duplicates(format_order)[source]
- classmethod validate_separator_characters(separator_characters)[source]