
    5 f                     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     T/var/www/equiseq/venv/lib/python3.11/site-packages/astroid/brain/brain_hypothesis.pyis_decorated_with_st_compositer      sk     49> dinQ.?.D.N.N#'?#8 	 	",,../AAtt B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   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   