Source code for config

# -*- coding: utf8 -*-
# SPDX-License-Identifier: CECILL-2.1
"""
Config class for sourcespec.

:copyright:
    2013-2024 Claudio Satriano <satriano@ipgp.fr>
:license:
    CeCILL Free Software License Agreement v2.1
    (http://www.cecill.info/licences.en.html)
"""


[docs] class Config(dict): """Config class for sourcespec.""" def __setitem__(self, key, value): """Make Config keys accessible as attributes.""" super().__setattr__(key, value) super().__setitem__(key, value) def __getattr__(self, key): """Make Config keys accessible as attributes.""" try: return self.__getitem__(key) except KeyError as err: raise AttributeError(err) from err __setattr__ = __setitem__