o
    hd                     @   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
    )AnchorF)TextAnyDictList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   s>   | dd }tj| g|R i |}|d ur|j|dd |S )NanchorT)always_dump)popint__new__yaml_set_anchor)clsargskwr   b r   ^/var/www/html/magazine_api/magazine_env/lib/python3.10/site-packages/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)__name__
__module____qualname__r   propertyr   r   r   r   r   r   r   r      s    

N)__doc__Zruamel.yaml.anchorr   typingr   r   r   r   __all__r   r   r   r   r   r   <module>   s
   	