
    hx                    4   S r SSKJr  SSKJrJrJrJrJr  SSK	J
r
  SSKrSSKrSSKr\" S\
S\4   S9r\" S	S
S9r\\\\\\4   \4      r\\4rSSS jjr      SS jr " S S
\\\4   \R0                  5      r\S:X  a  SSKr\R8                  " 5         gg)zThis 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BaseFormatVersionc                   ^  SU 4S jjnU$ )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
c                f   >^  [         R                  " T 5      U U4S j5       n[        [        U5      $ )Nc                 f   > [         R                  " TR                   ST 3[        SS9  T" U 0 UD6$ )Nz function is a deprecated.    )category
stacklevel)warningswarn__name__DeprecationWarning)argskwargsfuncmsgs     P/var/www/fran/franai/venv/lib/python3.13/site-packages/fontTools/ufoLib/utils.pywrapper9deprecated.<locals>.deprecated_decorator.<locals>.wrapper%   s:    MM==/!<SEB+
 (((    )	functoolswrapsr   r
   )r   r   r   s   ` r   deprecated_decorator(deprecated.<locals>.deprecated_decorator$   s-    			) 
	) Awr   )r   r
   returnr
    )r   r"   s   ` r   
deprecatedr&      s    
   r   c                    U c  UR                  5       $ [        X5      (       a  U $ [        U [        5      (       a
  U" U S45      $ [        U [        5      (       a  [	        U 5      S:X  a  U" U 5      $ [        SU < 35      e)Nr   r   zUnsupported format version: )default
isinstanceinttuplelen
ValueError)valueclss     r   normalizeFormatVersionr0   3   st     }{{}%%E1:%CJ!O5z
3E9=
>>r   c                     ^  \ rS rSr% S\S'   SU 4S jjr\SS j5       r\SS j5       r\	SS j5       r
SS jr\	SS	 j5       r\	SS
 j5       rSrU =r$ )r   C   tuple[int, int]r.   c                "   > [         TU ]  X5      $ N)super__new__)r/   r.   	__class__s     r   r7   BaseFormatVersion.__new__F   s    ws**r   c                     U R                   S   $ )Nr   r.   selfs    r   majorBaseFormatVersion.majorI       zz!}r   c                     U R                   S   $ )N   r;   r<   s    r   minorBaseFormatVersion.minorM   r@   r   c                    [        U[        5      (       a
  U " US45      $ Uc  U R                  5       $ [        U< SU R                   35      e)Nr   z is not a valid )r)   r*   r(   r-   r   )r/   r.   s     r   	_missing_BaseFormatVersion._missing_Q   sK     eS!!qz?"=;;= E9$4S\\NCDDr   c                8    U R                    SU R                   3$ )N.)r>   rC   r<   s    r   __str__BaseFormatVersion.__str__[   s    **Qtzzl++r   c                H    [        U R                  R                  5       5      $ r5   )max__members__valuesr/   s    r   r(   BaseFormatVersion.default^   s     3??))+,,r   c                H    [        U R                  R                  5       5      $ r5   )	frozensetrN   rO   rP   s    r   supported_versions$BaseFormatVersion.supported_versionsc   s    //122r   r%   )r/   Type[FormatVersion]r.   r3   r$   r   )r$   r*   )r.   objectr$   r   )r$   str)r/   rV   r$   r   )r/   rV   r$   zfrozenset[FormatVersion])r   
__module____qualname____firstlineno____annotations__r7   propertyr>   rC   classmethodrF   rJ   r(   rT   __static_attributes____classcell__)r8   s   @r   r   r   C   sy    +     E E, - - 3 3r   __main__) )r   rX   r$   zCallable[[F], F])r.   FormatVersionInputr/   rV   r$   r   )__doc__
__future__r   typingr   r   r   r   r   collections.abcr	   enumr    r   rW   r
   r   r*   r+   rc   floatnumberTypesr&   r0   Enumr   r   doctesttestmodr%   r   r   <module>rn      s    # 7 7 $   CxV,-/BCeCsCx-$GHI El 8??$7?? "3c3h "3J zOO r   