§
    ¢”jx  ã                  óT  — d Z ddlmZ ddlmZmZmZmZmZ ddl	m
Z
 ddlZddlZddlZ ede
def         ¬¦  «        Z ed	d
¬¦  «        Zeeeeeef         ef                  ZeefZddd„Zdd„Z G d„ d
eeef         ej        ¦  «        Zedk    rddlZ ej        ¦   «          dS dS )zÄThis module contains miscellaneous helpers.

It is not considered part of the public ufoLib API. It does, however,
define the :py:obj:`.deprecated` decorator that is used elsewhere in
the module.
é    )Úannotations)ÚOptionalÚTypeÚTypeVarÚUnionÚcast)ÚCallableNÚF.)ÚboundÚFormatVersionÚBaseFormatVersionÚ ÚmsgÚstrÚreturnúCallable[[F], F]c                ó   ‡ — dˆ fd„}|S )a@  Decorator factory to mark functions as deprecated with given message.

    >>> @deprecated("Enough!")
    ... def some_function():
    ...    "I just print 'hello world'."
    ...    print("hello world")
    >>> some_function()
    hello world
    >>> some_function.__doc__ == "I just print 'hello world'."
    True
    Úfuncr
   r   c                óp   •‡ — t          j        ‰ ¦  «        ˆ ˆfd„¦   «         }t          t          |¦  «        S )Nc                 ó`   •— t          j        ‰j        › d‰› �t          d¬¦  «          ‰| i |¤ŽS )Nz function is a deprecated. é   )ÚcategoryÚ
stacklevel)ÚwarningsÚwarnÚ__name__ÚDeprecationWarning)ÚargsÚkwargsr   r   s     €€úe/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/fontTools/ufoLib/utils.pyÚwrapperz9deprecated.<locals>.deprecated_decorator.<locals>.wrapper%   sL   ø€ åŒMØ”=ÐBÐB¸SÐBÐBÝ+Øðñ ô ð ð
 �4˜Ð( Ð(Ð(Ð(ó    )Ú	functoolsÚwrapsr   r
   )r   r!   r   s   ` €r    Údeprecated_decoratorz(deprecated.<locals>.deprecated_decorator$   sI   øø€ Ý	Œ˜Ñ	Ô	ð	)ð 	)ð 	)ð 	)ð 	)ñ 
Ô	ð	)õ •A�wÑÔÐr"   )r   r
   r   r
   © )r   r%   s   ` r    Ú
deprecatedr'      s)   ø€ ð
 ð 
 ð 
 ð 
 ð 
 ð 
 ð  Ðr"   ÚvalueÚFormatVersionInputÚclsúType[FormatVersion]c                ó   — | €|                      ¦   «         S t          | |¦  «        r| S t          | t          ¦  «        r || df¦  «        S t          | t          ¦  «        rt	          | ¦  «        dk    r || ¦  «        S t          d| ›�¦  «        ‚)Nr   r   zUnsupported format version: )ÚdefaultÚ
isinstanceÚintÚtupleÚlenÚ
ValueError)r(   r*   s     r    ÚnormalizeFormatVersionr3   3   s—   € ð €}Ø�{Š{‰}Œ}ÐÝ�%˜ÑÔð ØˆÝ�%�ÑÔð Øˆs�E˜1�:‰ŒÐÝ�%�ÑÔð ¥C¨¡J¤J°!¢O OØˆs�5‰zŒzÐÝ
Ð=°EÐ=Ð=Ñ
>Ô
>Ð>r"   c                  ó¬   ‡ — e Zd ZU ded<   dˆ fd„Zedd„¦   «         Zedd	„¦   «         Zedd„¦   «         Z	dd„Z
edd„¦   «         Zedd„¦   «         Zˆ xZS )r   útuple[int, int]r(   r*   r+   r   c                óH   •— t          ¦   «                              | |¦  «        S ©N)ÚsuperÚ__new__)r*   r(   Ú	__class__s     €r    r9   zBaseFormatVersion.__new__F   s   ø€ Ý‰wŒw�Š˜s EÑ*Ô*Ð*r"   r/   c                ó   — | j         d         S )Nr   ©r(   ©Úselfs    r    ÚmajorzBaseFormatVersion.majorI   ó   € àŒz˜!Œ}Ðr"   c                ó   — | j         d         S )Né   r<   r=   s    r    ÚminorzBaseFormatVersion.minorM   r@   r"   Úobjectc                ó¤   — t          |t          ¦  «        r | |df¦  «        S |€|                      ¦   «         S t          |›d| j        › �¦  «        ‚)Nr   z is not a valid )r.   r/   r-   r2   r   )r*   r(   s     r    Ú	_missing_zBaseFormatVersion._missing_Q   sY   € õ �e�SÑ!Ô!ð 	#Ø�3˜˜q�z‘?”?Ð"àˆ=Ø—;’;‘=”=Ð Ý˜EÐCÐC°S´\ÐCÐCÑDÔDÐDr"   r   c                ó$   — | j         › d| j        › �S )Nú.)r?   rC   r=   s    r    Ú__str__zBaseFormatVersion.__str__[   s   € Ø”*Ð+Ð+˜tœzÐ+Ð+Ð+r"   r   c                óN   — t          | j                             ¦   «         ¦  «        S r7   )ÚmaxÚ__members__Úvalues©r*   s    r    r-   zBaseFormatVersion.default^   s    € õ �3”?×)Ò)Ñ+Ô+Ñ,Ô,Ð,r"   úfrozenset[FormatVersion]c                óN   — t          | j                             ¦   «         ¦  «        S r7   )Ú	frozensetrL   rM   rN   s    r    Úsupported_versionsz$BaseFormatVersion.supported_versionsc   s   € å˜œ×/Ò/Ñ1Ô1Ñ2Ô2Ð2r"   )r*   r+   r(   r5   r   r   )r   r/   )r(   rD   r   r   )r   r   )r*   r+   r   r   )r*   r+   r   rO   )r   Ú
__module__Ú__qualname__Ú__annotations__r9   Úpropertyr?   rC   ÚclassmethodrF   rI   r-   rR   Ú__classcell__)r:   s   @r    r   r   C   s  ø€ € € € € € ØÐÐÑð+ð +ð +ð +ð +ð +ð ðð ð ñ „Xðð ðð ð ñ „Xðð ðEð Eð Eñ „[ðEð,ð ,ð ,ð ,ð ð-ð -ð -ñ „[ð-ð ð3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r"   Ú__main__)r   )r   r   r   r   )r(   r)   r*   r+   r   r   )Ú__doc__Ú
__future__r   Útypingr   r   r   r   r   Úcollections.abcr	   Úenumr#   r   rD   r
   r   r/   r0   r)   ÚfloatÚnumberTypesr'   r3   ÚEnumr   r   ÚdoctestÚtestmodr&   r"   r    ú<module>rd      so  ððð ð #Ð "Ð "Ð "Ð "Ð "à 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ø $Ð $Ð $Ð $Ð $Ð $Ø €€€Ø Ð Ð Ð Ø €€€à€GˆC�x  V Ô,Ð-Ñ-Ô-€Ø�˜Ð/BÐCÑCÔC€Ø˜e C¨¨s°C¨x¬¸-Ð$GÔHÔIÐ à�Eˆl€ð ð  ð  ð  ð  ð8?ð ?ð ?ð ?ð "3ð "3ð "3ð "3ð "3˜˜c 3˜hœ¨¬ñ "3ô "3ð "3ðJ ˆzÒÐØ€N€N€Nà€G„OÑÔÐÐÐð Ðr"   