def log_warn_only():
 coloredlogs.install(level='WARNING', level_styles={'warn': {'color': 'yellow'}, 'error': {'color': 'red', 'bold': True}}, fmt='%(message)s', isatty=True)

def log_warn_only ( ) : coloredlogs . install ( level = 'WARNING' , level_styles = { 'warn' : { 'color' : 'yellow' } , 'error' : { 'color' : 'red' , 'bold' : True } } , fmt = '%(message)s' , isatty = True )
drop to warning level and down to get around gen .