semantic_release.cli.util module¶
Utilities for command-line functionality
- semantic_release.cli.util.indented(msg: str, prefix: str = ' ') str [source]¶
Convenience function for text-formatting for the console.
Ensures the least indented line of the msg string is indented by
prefix
with consistent alignment of the remainder ofmsg
irrespective of the level of indentation in the Python source code
- semantic_release.cli.util.load_raw_config_file(config_file: Path | str) dict[Any, Any] [source]¶
Load raw configuration as a dict from the filename specified by config_filename, trying the following parsing methods:
try to parse with tomli.load (guessing it’s a TOML file)
try to parse with json.load (guessing it’s a JSON file)
raise InvalidConfiguration if none of the above parsing methods work
This function will also raise FileNotFoundError if it is raised while trying to read the specified configuration file
- semantic_release.cli.util.noop_report(msg: str) None [source]¶
Rich-prints a msg with a standard prefix to report when an action is not being taken due to a “noop” flag