Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
p_length = self.LEN(p_text)
end_point = self.LEN(c) - self.LEN(eta_c)
break_point = round(end_point * self.progress_current_item / self.progress_total_items)
# see a full list of color codes: https://gitlab.com/dslackw/colored
if p_length >= break_point:
sys.stderr.write(back.CYAN + fore.BLACK + c[:break_point] + \
back.GREY_30 + fore.WHITE + c[break_point:end_point] + \
back.CYAN + fore.CYAN + c[end_point] + \
back.GREY_50 + fore.LIGHT_CYAN + c[end_point:] + \
style.RESET)
else:
sys.stderr.write(back.CYAN + fore.BLACK + c[:break_point - p_length] + \
back.SALMON_1 + fore.BLACK + p_text + \
back.GREY_30 + fore.WHITE + c[break_point:end_point] + \
back.GREY_50 + fore.LIGHT_CYAN + c[end_point:] + \
style.RESET)
sys.stderr.flush()
else:
sys.stderr.write(back.CYAN + fore.BLACK + c + style.RESET)
sys.stderr.flush()