def __setitem__()

in azure-kusto-data/azure/kusto/data/kcsb.py [0:0]


    def __setitem__(self, key: "Union[SupportedKeywords, str]", value: Union[str, bool, dict]):
        keyword = Keyword.parse(key)

        if value is None:
            raise TypeError("Value cannot be None.")

        if keyword.is_str_type():
            self._internal_dict[keyword.name] = value.strip()
        elif keyword.is_bool_type():
            if not isinstance(value, bool):
                raise TypeError("Expected %s to be bool" % key)
            self._internal_dict[keyword.name] = value
        else:
            raise KeyError("KustoConnectionStringBuilder supports only bools and strings.")