U
    Æ½„bd  ã                   @   s*   d Z ddlmZ dgZG dd„ deƒZ	dS )a?  
You cannot subclass bool, and this is necessary for round-tripping anchored
bool values (and also if you want to preserve the original way of writing)

bool.__bases__ is type 'int', so that is what is used as the basis for ScalarBoolean as well.

You can use these in an if statement, but not when testing equivalence
é    )ÚAnchorÚScalarBooleanc                   @   s4   e Zd Zdd„ Zedd„ ƒZddd„Zddd	„Zd
S )r   c                 O   s8   |  dd ¡}tj| f|ž|Ž}|d k	r4|j|dd� |S )NÚanchorT)Úalways_dump)ÚpopÚintÚ__new__Úyaml_set_anchor)ÚclsÚargsÚkwr   Úb© r   ú:/tmp/pip-unpacked-wheel-ctuyz3qg/ruamel/yaml/scalarbool.pyr      s
    zScalarBoolean.__new__c                 C   s(   t | tjƒst| tjtƒ ƒ t| tjƒS ©N)Úhasattrr   ÚattribÚsetattrÚgetattr)Úselfr   r   r   r      s    zScalarBoolean.anchorFc                 C   s&   t | tjƒsd S |s| jjr"| jS d S r   )r   r   r   r   r   )r   Úanyr   r   r   Úyaml_anchor$   s
    zScalarBoolean.yaml_anchorc                 C   s   || j _|| j _d S r   )r   Úvaluer   )r   r   r   r   r   r   r	   ,   s    zScalarBoolean.yaml_set_anchorN)F)F)Ú__name__Ú
__module__Ú__qualname__r   Úpropertyr   r   r	   r   r   r   r   r      s
   

N)
Ú__doc__Zruamel.yaml.anchorr   ÚTextÚAnyÚDictÚListÚ__all__r   r   r   r   r   r   Ú<module>   s   	