:mod:`lookout.style.common` =========================== .. py:module:: lookout.style.common Module Contents --------------- .. function:: merge_dicts(*dicts) Merge several mappings together; nested values are merged recursively. Operation is not commutative, each next dictionary overrides values of the previous one for the same keys sequence. (see example). Example: >>> a = {1: 1, 2: {3: 3, 4: 4}} >>> b = {1: 10, 2: {3: 30, 4: 4, 5: 5}} >>> merge_dicts(a, b) >>> {1: 10, 2: {3: 30, 4: 4, 5: 5}} >>> merge_dicts(b, a) >>> {1: 1, 2: {3: 3, 4: 4, 5: 5}} :return: New merged dictionary. .. function:: load_jinja2_template(path:str) Return a loaded template by the specified file path. .. function:: huge_progress_bar(sequence:Sequence, log:logging.Logger, get_iter_name:Callable) Create big multi-line progress bar with the logs. .. function:: handle_input_arg(input_arg:Union[str, Iterable[str]], log:Optional[logging.Logger]=None) Process input arguments and return an iterator over input files. :param input_arg: list of files to process or `-` to get file paths from stdin. :param log: Logger if you want to log handling process. :return: An iterator over input files.