
    c                     x    d Z ddlmZ ddlmZ dZdefdZd Z e            	                    eee           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     >lib/python3.11/site-packages/astroid/brain/brain_hypothesis.pyis_decorated_with_st_compositer      sn     49> dinQ.?.D.N #'?#8 	 	",,../A tt5    c                 T    | j         j         d= | j         j        d= | j         j        d= | S )zGiven 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   )
node_class	transform	predicateN)
__doc__astroid.managerr   astroid.nodes.scoped_nodesr   r   boolr   r   register_transform r   r   <module>r!      s   
  + * * * * * 2 2 2 2 2 2D          # #;, $     r   