a
    ܌xd                     @   s   d dl mZ d dlmZmZmZmZ g dZG dd deZ	G dd de	Z
G dd	 d	e	ZG d
d de	ZG dd de	ZG dd de	ZdS )    )Anchor)TextAnyDictList)	ScalarInt	BinaryIntOctalIntHexInt
HexCapsInt
DecimalIntc                   @   s   e Zd ZeeeedddZeedddZeedddZeedd	d
ZeedddZeedddZ	e
edddZdeedddZdeeddddZdS )r   )clsargskwreturnc                 O   sb   | dd }| dd }| dd }tj| g|R i |}||_||_|d ur^|j|dd |S )Nwidth
underscoreanchorT)always_dump)popint__new___width_underscoreyaml_set_anchor)r   r   r   r   r   r   v r   M/var/www/html/Ranjet/env/lib/python3.9/site-packages/ruamel/yaml/scalarint.pyr      s    zScalarInt.__new__)ar   c                 C   s:   t | | | }| j|_| jd ur0| jd d  nd |_|S Ntyper   r   selfr   xr   r   r   __iadd__   s
    zScalarInt.__iadd__c                 C   s:   t | | | }| j|_| jd ur0| jd d  nd |_|S r   r    r"   r   r   r   __ifloordiv__   s
    zScalarInt.__ifloordiv__c                 C   s:   t | | | }| j|_| jd ur0| jd d  nd |_|S r   r    r"   r   r   r   __imul__&   s
    zScalarInt.__imul__c                 C   s:   t | | | }| j|_| jd ur0| jd d  nd |_|S r   r    r"   r   r   r   __ipow__.   s
    zScalarInt.__ipow__c                 C   s:   t | | | }| j|_| jd ur0| jd d  nd |_|S r   r    r"   r   r   r   __isub__6   s
    zScalarInt.__isub__)r   c                 C   s(   t | tjst| tjt  t| tjS r   )hasattrr   attribsetattrgetattr)r#   r   r   r   r   >   s    zScalarInt.anchorF)anyr   c                 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_anchorD   s
    zScalarInt.yaml_anchorN)valuer   r   c                 C   s   || j _|| j _d S r   )r   r0   r   )r#   r0   r   r   r   r   r   K   s    zScalarInt.yaml_set_anchor)F)F)__name__
__module____qualname__r   r   r%   r&   r'   r(   r)   propertyr   boolr/   r   r   r   r   r   r   
   s   r   c                   @   s$   e Zd ZdeeeeedddZdS )r   Nr0   r   r   r   r   c                 C   s   t j| ||||dS N)r   r   r   r   r   r   r0   r   r   r   r   r   r   r   Q   s    zBinaryInt.__new__)NNNr1   r2   r3   r   r   r   r   r   r   r   P   s
    r   c                   @   s$   e Zd ZdeeeeedddZdS )r	   Nr6   c                 C   s   t j| ||||dS r7   r8   r9   r   r   r   r   X   s    zOctalInt.__new__)NNNr:   r   r   r   r   r	   W   s
    r	   c                   @   s(   e Zd ZdZdeeeeedddZdS )r
   zuses lower case (a-f)Nr6   c                 C   s   t j| ||||dS r7   r8   r9   r   r   r   r   e   s    zHexInt.__new__)NNNr1   r2   r3   __doc__r   r   r   r   r   r   r
   b   s    r
   c                   @   s(   e Zd ZdZdeeeeedddZdS )r   zuses upper case (A-F)Nr6   c                 C   s   t j| ||||dS r7   r8   r9   r   r   r   r   n   s    zHexCapsInt.__new__)NNNr;   r   r   r   r   r   k   s    r   c                   @   s(   e Zd ZdZdeeeeedddZdS )r   zneeded if anchorNr6   c                 C   s   t j| ||||dS r7   r8   r9   r   r   r   r   w   s    zDecimalInt.__new__)NNNr;   r   r   r   r   r   t   s    r   N)Zruamel.yaml.anchorr   typingr   r   r   r   __all__r   r   r   r	   r
   r   r   r   r   r   r   <module>   s   F		