§
    ñyIf  ã                   óH   — d Z ddlmZ ddlmZ dZdefd„Zd„ Zdedd	fd
„Z	d	S )aV  
Astroid hook for the Hypothesis library.

Without this hook pylint reports no-value-for-parameter for use of strategies
defined using the `@hypothesis.strategies.composite` decorator.  For example:

    from hypothesis import strategies as st

    @st.composite
    def a_strategy(draw):
        return draw(st.integers())

    a_strategy()
é    )ÚAstroidManager)ÚFunctionDef)Ú	compositezst.compositezstrategies.compositezhypothesis.strategies.compositeÚreturnc                 ó¼   — | j         rT| j        j        rH| j        j        d         j        dk    r-| j         j        D ] }|                     ¦   «         t
          v r dS Œ!dS )z:Return whether a decorated node has @st.composite applied.r   ÚdrawTF)Ú
decoratorsÚargsÚnameÚnodesÚ	as_stringÚCOMPOSITE_NAMES)ÚnodeÚdecorator_attributes     úR/var/www/piapp/venv/lib/python3.11/site-packages/astroid/brain/brain_hypothesis.pyÚis_decorated_with_st_compositer      sk   € à„ð ˜4œ9œ>ð ¨d¬i¬n¸QÔ.?Ô.DÈÒ.NÐ.NØ#'¤?Ô#8ð 	ð 	ÐØ"×,Ò,Ñ.Ô.µ/ÐAÐAØ�t�tð Bàˆ5ó    c                 óT   — | j         j         d= | j         j        d= | j         j        d= | S )zÊGiven that the FunctionDef is decorated with @st.composite, remove the
    first argument (`draw`) - it's always supplied by Hypothesis so we don't
    need to emit the no-value-for-parameter lint.
    r   )r
   ÚannotationsÚtype_comment_args)r   s    r   Ú-remove_draw_parameter_from_composite_strategyr   '   s/   € ð
 	Œ	Œ�qÐØŒ	Ô˜aÐ ØŒ	Ô# AÐ&Ø€Kr   ÚmanagerNc                 óT   — |                       t          t          t          ¬¦  «         d S )N)Ú
node_classÚ	transformÚ	predicate)Úregister_transformr   r   r   )r   s    r   Úregisterr   2   s2   € Ø×ÒÝÝ?Ý0ð ñ ô ð ð ð r   )
Ú__doc__Úastroid.managerr   Úastroid.nodes.scoped_nodesr   r   Úboolr   r   r   © r   r   ú<module>r$      s’   ðð
ð ð +Ð *Ð *Ð *Ð *Ð *Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2ð€ð¨Dð ð ð ð ðð ð ð�nð ¨ð ð ð ð ð ð r   