
    zPj5                    >    d Z ddlmZ ddlmZ 	 dgZ
 G d de      Zy)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)AnchorScalarBooleanc                  :    e Zd ZddZedd       Zdd	dZdd
dZy)r   c                    |j                  dd       }t        j                  | g|i |}||j                  |d       |S )NanchorT)always_dump)popint__new__yaml_set_anchor)clsargskwr   bs        N/root/$HERMES_HOME/venv/lib/python3.12/site-packages/ruamel/yaml/scalarbool.pyr   zScalarBoolean.__new__   sH    $'KK)d)b)f$7    c                    t        | t        j                        s#t        | t        j                  t                      t	        | t        j                        S N)hasattrr   attribsetattrgetattr)selfs    r   r   zScalarBoolean.anchor   s3    tV]]+D&--2tV]]++r   c                    t        | t        j                        sy |s| j                  j                  r| j                  S y r   )r   r   r   r   r	   )r   anys     r   yaml_anchorzScalarBoolean.yaml_anchor"   s/    tV]]+$++));;r   c                H    || j                   _        || j                   _        y r   )r   valuer	   )r   r   r	   s      r   r   zScalarBoolean.yaml_set_anchor)   s    !"-r   N)r   Anyr   r    r   r    returnr    )r!   r    )F)r   boolr!   r    )r   r    r	   r"   r!   None)__name__
__module____qualname__r   propertyr   r   r    r   r   r   r      s%     , ,
.r   N)__doc__
__future__r   ruamel.yaml.anchorr   typingTextr    DictList__all__r   r   r(   r   r   <module>r1      s+    # % 
.C .r   