colour.utilities.ignore_python_warnings

colour.utilities.ignore_python_warnings(function)[source]

Decorator for ignoring Python warnings.

Parameters

function (object) – Function to decorate.

Returns

Return type

object

Examples

>>> @ignore_python_warnings
... def f():
...     warnings.warn('This is an ignored warning!')
>>> f()