Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def disableColoring():
originalOutputFunction = ic.outputFunction
ic.configureOutput(outputFunction=stderrPrint)
yield
ic.configureOutput(outputFunction=originalOutputFunction)
def configureIcecreamOutput(prefix=None, outputFunction=None,
argToStringFunction=None, includeContext=None):
oldPrefix = ic.prefix
oldOutputFunction = ic.outputFunction
oldArgToStringFunction = ic.argToStringFunction
oldIncludeContext = ic.includeContext
if prefix:
ic.configureOutput(prefix=prefix)
if outputFunction:
ic.configureOutput(outputFunction=outputFunction)
if argToStringFunction:
ic.configureOutput(argToStringFunction=argToStringFunction)
if includeContext:
ic.configureOutput(includeContext=includeContext)
yield
ic.configureOutput(
oldPrefix, oldOutputFunction, oldArgToStringFunction,
oldIncludeContext)
def configureIcecreamOutput(prefix=None, outputFunction=None,
argToStringFunction=None, includeContext=None):
oldPrefix = ic.prefix
oldOutputFunction = ic.outputFunction
oldArgToStringFunction = ic.argToStringFunction
oldIncludeContext = ic.includeContext
if prefix:
ic.configureOutput(prefix=prefix)
if outputFunction:
ic.configureOutput(outputFunction=outputFunction)
if argToStringFunction:
ic.configureOutput(argToStringFunction=argToStringFunction)
if includeContext:
ic.configureOutput(includeContext=includeContext)
yield
ic.configureOutput(
oldPrefix, oldOutputFunction, oldArgToStringFunction,
oldIncludeContext)
oldOutputFunction = ic.outputFunction
oldArgToStringFunction = ic.argToStringFunction
oldIncludeContext = ic.includeContext
if prefix:
ic.configureOutput(prefix=prefix)
if outputFunction:
ic.configureOutput(outputFunction=outputFunction)
if argToStringFunction:
ic.configureOutput(argToStringFunction=argToStringFunction)
if includeContext:
ic.configureOutput(includeContext=includeContext)
yield
ic.configureOutput(
oldPrefix, oldOutputFunction, oldArgToStringFunction,
oldIncludeContext)
def configureIcecreamOutput(prefix=None, outputFunction=None,
argToStringFunction=None, includeContext=None):
oldPrefix = ic.prefix
oldOutputFunction = ic.outputFunction
oldArgToStringFunction = ic.argToStringFunction
oldIncludeContext = ic.includeContext
if prefix:
ic.configureOutput(prefix=prefix)
if outputFunction:
ic.configureOutput(outputFunction=outputFunction)
if argToStringFunction:
ic.configureOutput(argToStringFunction=argToStringFunction)
if includeContext:
ic.configureOutput(includeContext=includeContext)
yield
ic.configureOutput(
oldPrefix, oldOutputFunction, oldArgToStringFunction,
oldIncludeContext)
def configureIcecreamOutput(prefix=None, outputFunction=None,
argToStringFunction=None, includeContext=None):
oldPrefix = ic.prefix
oldOutputFunction = ic.outputFunction
oldArgToStringFunction = ic.argToStringFunction
oldIncludeContext = ic.includeContext
if prefix:
ic.configureOutput(prefix=prefix)
if outputFunction:
ic.configureOutput(outputFunction=outputFunction)
if argToStringFunction:
ic.configureOutput(argToStringFunction=argToStringFunction)
if includeContext:
ic.configureOutput(includeContext=includeContext)
yield
ic.configureOutput(
oldPrefix, oldOutputFunction, oldArgToStringFunction,
oldIncludeContext)