o
    ei5                     @  s8   d Z ddlm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
    )annotations)AnchorF)TextAnyDictListScalarBooleanc                   @  s<   e Zd ZdddZeddd	ZddddZddddZdS )r   clsr   argskwreturnc                 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)r	   r
   r   r   b r   T/home/ubuntu/transcripts/venv/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.anchorFanyboolc                 C  s&   t | tjsd S |s| jjr| jS d S r   )r   r   r   r   r   )r   r   r   r   r   yaml_anchor"   s
   zScalarBoolean.yaml_anchorvaluer   Nonec                 C  s   || j _|| j _d S r   )r   r   r   )r   r   r   r   r   r   r   )   s   zScalarBoolean.yaml_set_anchorN)r	   r   r
   r   r   r   r   r   )r   r   )F)r   r   r   r   )r   r   r   r   r   r    )__name__
__module____qualname__r   propertyr   r   r   r   r   r   r   r      s    
N)__doc__
__future__r   ruamel.yaml.anchorr   typingr   r   r   r   __all__r   r   r   r   r   r   <module>   s    	