관리-도구
편집 파일: manager.cpython-39.pyc
a `8ab � @ sH d dl mZ ddlmZ ddlmZ ddlmZ dZG dd� de �Z d S ) � )�deepcopy� )� Configuration)�Setting)�Source)�ConfigurationManagerc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )r c C s || _ g | _d S )N)�name�settings)�selfr � r �H/home/carl/code/landscape/setoptconf-tmp/build/lib/setoptconf/manager.py�__init__ s zConfigurationManager.__init__c C s$ t |t�r| j�|� ntd��d S )Nz$Can only add objects of type Setting)� isinstancer r �append� TypeError)r �settingr r r �add s zConfigurationManager.addc G s� g }t |�D ]D}t|t�r&|�|� qt|t�rHt|t�rH|�|� � qtd��qt| jd�}|D ]}|j t | j�| |d�}qb|�� |S )NzAll sources must be a Source)r )�manager�parent)�reversedr r r �type� issubclassr r r Z get_configr �validate)r �sourcesZ to_process�source�configr r r �retrieve s �zConfigurationManager.retrieveN)�__name__� __module__�__qualname__r r r r r r r r s r N)�copyr r r r r Zsource.baser �__all__�objectr r r r r �<module> s