colour.utilities.suppress_warnings

colour.utilities.suppress_warnings(colour_runtime_warnings=None, colour_usage_warnings=None, colour_warnings=None, python_warnings=None)[source]

A context manager filtering Colour and also optionally overall Python warnings.

The possible values for all the actions, i.e. each argument, are as follows:

  • None (No action is taken)

  • True (ignore)

  • False (default)

  • error

  • ignore

  • always

  • default

  • module

  • once

Parameters
  • colour_runtime_warnings (bool or unicode, optional) – Whether to filter Colour runtime warnings according to the action value.

  • colour_usage_warnings (bool or unicode, optional) – Whether to filter Colour usage warnings according to the action value.

  • colour_warnings (bool or unicode, optional) – Whether to filter Colour warnings, this also filters Colour usage and runtime warnings according to the action value.

  • python_warnings (bool or unicode, optional) – Whether to filter Python warnings according to the action value.