excel_compare/scripts/compare.py
def color_diff(diff, clean):
        """
            Color the differences from difflib library
            :param fname: file path
            :return: checksum string
        """
        for line in diff:
            if line.startswith('+'):
                yield f"{Fore.GREEN}{line}{Fore.RESET}"
            elif line.startswith('-'):
                yield f"{Fore.RED}{line}{Fore.RESET}"
            elif line.startswith('^'):
                yield f"{Fore.BLUE}{line}{Fore.RESET}"
            elif line.startswith('@'):
                yield f"{Fore.BLUE}{line}{Fore.RESET}"
            else:
                if not clean:
                    yield line

            Color the differences from difflib library
            :param fname: file path
            :return: checksum string
        
Color the differences from difflib library
Color the differences from difflib library
def color_diff(diff, clean):
        for line in diff:
            if line.startswith('+'):
                yield f"{Fore.GREEN}{line}{Fore.RESET}"
            elif line.startswith('-'):
                yield f"{Fore.RED}{line}{Fore.RESET}"
            elif line.startswith('^'):
                yield f"{Fore.BLUE}{line}{Fore.RESET}"
            elif line.startswith('@'):
                yield f"{Fore.BLUE}{line}{Fore.RESET}"
            else:
                if not clean:
                    yield line
def color_diff ( diff , clean ) : for line in diff : if line . startswith ( '+' ) : yield f"{Fore.GREEN}{line}{Fore.RESET}" elif line . startswith ( '-' ) : yield f"{Fore.RED}{line}{Fore.RESET}" elif line . startswith ( '^' ) : yield f"{Fore.BLUE}{line}{Fore.RESET}" elif line . startswith ( '@' ) : yield f"{Fore.BLUE}{line}{Fore.RESET}" else : if not clean : yield line
Color the differences from difflib library
Color the differences from difflib library
"""
            Color the differences from difflib library
            :param fname: file path
            :return: checksum string
        """
None
diff
clean
fname
None