src/orion/core/io/config.py
def _validate(self, key, value):
        """Validate the (key, value) option

        Raises
        ------
        TypeError
            - If the value is a Configuration object while the key is defined as a normal field
              (str, int, bool, etc). It cannot be overwritten by a subconfiguration.
            - If the type of `value` is not valid for `key`.

        """
        if isinstance(value, Configuration):
            raise TypeError(
                "Cannot overwrite option {} with a configuration".format(key)
            )

        try:
            self._config[key]["type"](value)
        except ValueError as e:
            message = "Option {} of type {} cannot be set to {} with type {}".format(
                key, self._config[key]["type"], value, type(value)
            )
            raise TypeError(message) from e
Validate the (key, value) option

        Raises
        ------
        TypeError
            - If the value is a Configuration object while the key is defined as a normal field
              (str, int, bool, etc). It cannot be overwritten by a subconfiguration.
            - If the type of `value` is not valid for `key`.

        
Validate the (key, value) option
Raises

TypeError
If the value is a Configuration object while the key is defined as a normal field
(str, int, bool, etc). It cannot be overwritten by a subconfiguration.
If the type of `value` is not valid for `key`.
Validate the ( key value ) option Raises TypeError If the value is a Configuration object while the key is defined as a normal field ( str int bool etc ) . It cannot be overwritten by a subconfiguration . If the type of ` value ` is not valid for ` key ` .
def _validate(self, key, value):
        if isinstance(value, Configuration):
            raise TypeError(
                "Cannot overwrite option {} with a configuration".format(key)
            )
        try:
            self._config[key]["type"](value)
        except ValueError as e:
            message = "Option {} of type {} cannot be set to {} with type {}".format(
                key, self._config[key]["type"], value, type(value)
            )
            raise TypeError(message) from e
def _validate ( self , key , value ) : if isinstance ( value , Configuration ) : raise TypeError ( "Cannot overwrite option {} with a configuration" . format ( key ) ) try : self . _config [ key ] [ "type" ] ( value ) except ValueError as e : message = "Option {} of type {} cannot be set to {} with type {}" . format ( key , self . _config [ key ] [ "type" ] , value , type ( value ) ) raise TypeError ( message ) from e
Validate the (key, value) option
Raises
Validate the ( key value ) option Raises
"""Validate the (key, value) option

        Raises
        ------
        TypeError
            - If the value is a Configuration object while the key is defined as a normal field
              (str, int, bool, etc). It cannot be overwritten by a subconfiguration.
            - If the type of `value` is not valid for `key`.

        """
self
key
value