
    jj5                    F    d Z ddlmZ ddlmZ 	 dgZ
 G 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                  B    e Zd ZddZedd            ZdddZdddZdS )r	   clsr   argskwreturnc                    |                     dd           }t          j        | g|R i |}||                    |d           |S )NanchorT)always_dump)popint__new__yaml_set_anchor)r   r   r   r   bs        f/lsinfo/ai/hellotax_ai/data_center/backend/venv/lib/python3.11/site-packages/ruamel/yaml/scalarbool.pyr   zScalarBoolean.__new__   sX    $''K)d)))b))f$77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   s@    tV]++ 	3D&-222tV]+++r   Fanyboolc                h    t          | t          j                  sd S |s| j        j        r| j        S d S r   )r   r   r   r   r   )r   r    s     r   yaml_anchorzScalarBoolean.yaml_anchor"   s<    tV]++ 	4 	$+) 	;tr   valuer   Nonec                6    || j         _        || j         _        d S r   )r   r$   r   )r   r$   r   s      r   r   zScalarBoolean.yaml_set_anchor)   s    !"-r   N)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	      sz            , , , X,
    . . . . . . .r   N)__doc__
__future__r   ruamel.yaml.anchorr   typingr   r   r   r   __all__r   r	   r+   r   r   <module>r1      sx     # " " " " " % % % % % %- 
. . . . .C . . . . .r   